routing errors while changing into production mode in rails3
Hey, I hope you can help me. Ive been working in development mode all the time.
Everything seems fine so far. As I started up the production mode all my .css and .js got routing errors and were not visible.Many thanks!
Started GET "开发者_C百科/javascripts/application.js?1293486752" for 127.0.0.1 at Thu Jan 13 23:11:21 +0100 2011
ActionController::RoutingError (No route matches "/javascripts/application.js"):
Rails defaults to not serving static assets in production, as the web server is generally more optimized for those kind of tasks. Most likely this is the problem.
To fix it, you can either set config.serve_static_assets = true
in config/environments/production.rb
, or configure the web server to do it for you.
精彩评论