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

后端 未结 2 1421
孤城傲影
孤城傲影 2020-12-30 22:58

Standard new rails app has issue showing the rails.png

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

I hav

相关标签:
2条回答
  • 2020-12-30 23:17

    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.

    0 讨论(0)
  • 2020-12-30 23:28

    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!

    0 讨论(0)
提交回复
热议问题