开发者

Server unable to find public folder in rails 3 production environment

开发者 https://www.devze.com 2022-12-29 05:36 出处:网络
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 fou

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 m开发者_如何学JAVAessages for everything that should be in the public folder. I've tried this with both mongrel and webrick. I'd appreciate any help.


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

config.serve_static_assets = true


nginx, unicorn and apache will do this automatically. be sure to change this back to false if you are deploying using these servers.

0

精彩评论

暂无评论...
验证码 换一张
取 消