在我当前的 ruby on rails 项目中,我使用 webrick(默认)服务器进行开发。我有一个单独的服务器来测试应用程序,我想将环境设置为其中的产品。我使用以下行在生产模式下运行服务器。
rails s -e production
问题是,如果它处于开发模式,它可以完美运行,但在服务器模式下,我收到以下错误:
Started GET "/" for 172.20.7.94 at Thu Jun 07 10:35:45 +0530 2012
Processing by FrontendController#dashboard as HTML
Rendered frontend/dashboard.html.erb within layouts/frontend (3.0ms)
Completed 200 OK in 50ms (Views: 22.0ms | ActiveRecord: 0.0ms)
Started GET "/assets/frontend-datauri.css" for 172.20.7.94 at Thu Jun 07 10:35:4
6 +0530 2012
Processing by Jammit::Controller#package as HTML
Parameters: {"extension"=>"css", "package"=>"frontend-datauri"}
Completed 500 Internal Server Error in 190ms
NameError (uninitialized constant POpen4::Open4):
Started GET "/assets/frontend.js" for 172.20.7.94 at Thu Jun 07 10:35:46 +0530 2
012
Processing by Jammit::Controller#package as
Parameters: {"extension"=>"js", "package"=>"frontend"}
Completed 500 Internal Server Error in 105ms
NameError (uninitialized constant POpen4::Open4):
我正在使用 Jammit 和 POpen4,我的 rails 版本是:3.0.9。红宝石版本 1.8.7。我目前无法升级版本,因为该项目涉及其他几个开发人员。谁能给我一个解决方案。
谢谢