Reputation: 21553
I have placed my css in stylesheets folder and image in images folder. Both of these folders are in public folder of my rails application. However, I keep getting these errors:
Started GET "/assets/blueprint/print.css" for 127.0.0.1 at Sat Nov 12 07:36:49 -0500 2011
Served asset /blueprint/print.css - 404 Not Found (2ms)
ActionController::RoutingError (No route matches [GET] "/assets/blueprint/print.css"):
Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.3ms)
Started GET "/assets/custom.css" for 127.0.0.1 at Sat Nov 12 07:36:49 -0500 2011
Served asset /custom.css - 404 Not Found (2ms)
ActionController::RoutingError (No route matches [GET] "/assets/custom.css"):
Rendered /Library/Ruby/Gems/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.4ms)
Started GET "/assets/logo.png" for 127.0.0.1 at Sat Nov 12 07:36:49 -0500 2011
Served asset /logo.png - 404 Not Found (3ms)
ActionController::RoutingError (No route matches [GET] "/assets/logo.png"):
What am I doing wrong? Thanks.
Upvotes: 2
Views: 2592
Reputation: 45
I was having a similar issue trying to get the correct assets to be included, but I was using Rails 3.2.6. This worked for me:
gem install sprockets
and then
bundle install
source: http://guides.rubyonrails.org/asset_pipeline.html#how-to-use-the-asset-pipeline
Upvotes: 1
Reputation: 3224
Looks like you are using 3.1. Try putting your stylesheet and js files under the assets directory. see the section on how to use the asset pipeline here
Upvotes: 2