问题
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.
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.
Here is the whole code for the application : https://github.com/jaipratik/i_have_removed_it
I am getting the following errors.
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)
Comment on above error: i have updated the gems 'gem update'
-------Error: ----------------------------
ActionController::RoutingError (No route matches [GET] "/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 -----------------------------
回答1:
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.
Suggestion: try using Firebug.
来源:https://stackoverflow.com/questions/8276094/rails3-1-3-error-gems-actionpack-3-1-3-lib-action-dispatch-middleware-templ