Rails3.1.3错误:救援/布局中的/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb [英] Rails3.1.3 Error : /gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout
问题描述
我正在尝试使用gem'fancybox-rails'&已按照gem的要求更新了文件.
I am trying to use gem 'fancybox-rails' & have updated the files as required by gem.
我创建了一个控制器和一个视图来生成带有视频链接的页面.
I created a controller and a view to generate a page with video links.
我正在使用Rails 3.1.3.我已使用捆绑包更新"和&一切似乎都符合要求,但出现以下错误.
I am using Rails 3.1.3. I have updated my bundle using "bundle update" & everything seems to be in line but I am getting the following error.
这是应用程序的全部代码: https://github.com/jaipratik/i_have_removed_it
Here is the whole code for the application : https://github.com/jaipratik/i_have_removed_it
我遇到以下错误.
输出-开发日志(可能有用)
Output - Development log (may be useful )
Rendered /Users/jayparteek/.rvm/gems/ruby-1.9.2-head@default/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
Rendered /Users/jayparteek/.rvm/gems/ruby-1.9.2-head@default/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
Rendered /Users/jayparteek/.rvm/gems/ruby-1.9.2-head@default/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (3.7ms)
-----错误:-----------------------------
-----Error: -----------------------------
Rendered /Users/jayparteek/.rvm/gems/ruby-1.9.2-head@default/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.6ms)
关于上述错误的评论:我已经更新了gems'gem update'
Comment on above error: i have updated the gems 'gem update'
-------错误:----------------------------
-------Error: ----------------------------
ActionController::RoutingError (No route matches [GET] "/cycling_small.jpg"):
对以上错误的评论:该图像位于资源/文件夹/...内部.我可以访问此图像 通过 http://localhost:3000/assets/cycling_small.jpg
Comment on above error: This image is placed inside assets/folder/.... I can access this image via http://localhost:3000/assets/cycling_small.jpg
-------------图像不显示---------------------------- -
------------- Images doesn't show up -----------------------------
推荐答案
这个愚蠢的错误占用了我很多时间.让我告诉您一个解决方案.
This silly error sucked up a lot of my time. Let me tell you one time solution for it.
出现此错误的唯一原因是代码中的错误.
The only reason you get this error is YOUR MISTAKES in the code.
我能够使用源的绝对路径在浏览器中显示图像
我不知道为什么不起作用.对我来说,这仍然是一个谜.
I was able to display my images on the browser by using the absolute path to the source
I dont know why doesn't work. For me its still a mystery.
建议:尝试使用Firebug.
Suggestion: try using Firebug.
这篇关于Rails3.1.3错误:救援/布局中的/gems/actionpack-3.1.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!