Frank I.
2011-May-25 20:39 UTC
(solution) .js and .css error when using production environment
When changing to a production deployment with a single rails instance, NOT proxied, errors showed up on the console, and of course .js and .css files were not served as a result: ActionController::RoutingError (No route matches "/javascripts/application.js"): ActionController::RoutingError (No route matches "/favicon.ico"): Solution: in config/environments/production.rb: # Disable Rails''s static asset server # In production, Apache or nginx will already do this # config.serve_static_assets = false The key is to comment the third line. I know: using Mongrel for production isn''t recommended, to say the least. I''m just posting the info so if you try it, you''ll know why it''s behaving differently. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.