no route matches for assets/images in Rails

asset-pipeline

Solution

Actually you cannot reference your image with `/assets/home.png` path. It will work in development mode, but in production all of your assets have a fingerprint in their filename (read this http://guides.rubyonrails.org/asset_pipeline.html#what-is-fingerprinting-and-why-should-i-care-questionmark)

That's why, in assets-pipeline enabled applications you need to reference all of your assets using helper methods. Read this doc to learn about the different helpers available in Ruby, JS and Sass files: http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets

Problem

Working on rails, images are not visible and giving error. ``` Started GET "/assets/home.png" for 127.0.0.1 at 2012-06-19 12:23:24 +0530 Served asset /home.png - 404 Not Found (24ms) ActionController::RoutingError (No route matches [GET] "/assets/home.png"): ``` I have used command ``` rake assets:precompile ``` production.rb ``` config.assets.compress = true config.assets.compile = false ``` application.rb ``` config.assets.enabled = true config.assets.version = '1.0' ``` Thanks for any help!

Original source