rails 3.1 ActionController::RoutingError(没有路线匹配 [GET] “/assets/rails.png"): [英] rails 3.1 ActionController::RoutingError (No route matches [GET] "/assets/rails.png"):

查看:29
本文介绍了rails 3.1 ActionController::RoutingError(没有路线匹配 [GET] “/assets/rails.png"):的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标准的新 Rails 应用程序在显示 rails.png 时出现问题

Standard new rails app has issue showing the rails.png

ActionController::RoutingError (No route matches [GET] "/assets/rails.png"):

我尝试将 .png 文件移动到资产和资产/图像中的各个位置以及旧位置公共"或公共/图像"并更改页面,但没有任何帮助.如果您已经看到并解决了这个问题,请回答.我自己尝试了大约 20 种不同的组合.

I have tried moving the .png file around to various places in assets and assets/images and also the older place 'public' or 'public/images' and changing the page but nothing has helped. Please answer if you have seen and resolved this. I have tried about 20 different combo's myself.

版本:'导轨','3.1.0.rc4'

Version: 'rails', '3.1.0.rc4'

推荐答案

肯定是rc4的问题,因为最终版本没有这个问题.

It must have been an rc4 issue as the final release didn't have this issue.

11/27/11 - 我现在想知道这是否只是由于 rails 3.1 中引入的资产管道,需要 rake assets:precompile command(从 app/assets public/编译和复制图片、css和js.
如果有人发现是这种情况,请添加评论!

11/27/11 - I now wonder if this was just due to the asset pipeline that was introduced in rails 3.1, requiring the rake assets:precompile command (compiles and copies images, css and js from app/assets to public/.
If anyone finds that to be the case, please add a comment!

这篇关于rails 3.1 ActionController::RoutingError(没有路线匹配 [GET] “/assets/rails.png"):的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆