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

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


I just had a problem throwing a similar error. In my case I was starting the rails server in production mode in Mac OSX using the standard WEBrick. It threw this error because of the line:

config.serve_static_assets = false

in config/environments/production.rb.

That is set because on most production machines the web server itself will handle this.

It looks like you were having a different problem, but I'll post this here for others that run into this error.


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

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!