Routing errors when switching to production mode in rails3

Hey, hope you can help me. I work in development mode all the time.
So far, everything seems beautiful. When I started production mode, all my .css and .js got routing errors and were not visible.

Many thanks!

Started GET "/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"):

+3
source share
1 answer

By default, Rails does not serve static assets during production, as the web server is generally more optimized for such tasks. This is most likely a problem.

To fix this, you can set config.serve_static_assets = truein config/environments/production.rband configure the Web server to do that for you.

+7
source

Source: https://habr.com/ru/post/1785304/


All Articles