Server unable to find public folder in rails 3 production environment

James picture James · May 7, 2010 · Viewed 13.8k times · Source

I'm using the latest rails 3 beta. The app works fine in development mode, but when I start the server in production mode via rails server -e production, it seems that the public folder can't be found. I get error messages like:

ActionController::RoutingError (No route matches "/javascripts/jquery.js"):

And similar messages for everything that should be in the public folder. I've tried this with both mongrel and webrick. I'd appreciate any help.

Answer

d4ny1 picture d4ny1 · May 7, 2010

editing config/environments/production.rb and setting this line:

config.serve_static_assets = true