JRuby +玻璃鱼宝石 +捆绑器错误
当尝试在生产中使用 JRuby、Bundler、Glassfish gem 和 Rails 2.3.9 时,我收到以下错误:
Could not load the bundler gem. Install it with `gem install bundler`
无论我尝试什么,都会发生这种情况。我通过 capistrano 进行部署,并在应用程序的共享目录中创建捆绑包。 Bundler 已安装,我可以在 gem env 中看到它。
我通过
cd #{current_path}; bundle exec glassfish -P #{shared_path}/pids/glassfish.pid"
服务器确实启动了应用程序,但当我转到应用程序 URL 时,我收到“出现问题”。
有什么想法吗?
I'm getting the following error when trying to use JRuby, Bundler, the Glassfish gem, and Rails 2.3.9 in production:
Could not load the bundler gem. Install it with `gem install bundler`
No matter what I try, this happens. I deploy via capistrano, and the bundle gets created in the shared directory of the app. Bundler is installed and I can see it in gem env.
I'm starting the app via
cd #{current_path}; bundle exec glassfish -P #{shared_path}/pids/glassfish.pid"
The server does start, but I get a "Something went wrong" when I go to the app URL.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
罗伯特,
首先,我假设您已按照 http://gembundler.com/rails23.html。如果没有,请确保这样做。
其次,确保您正在使用 JRuby 运行
bundle
:第三,
-P
需要守护进程,因此请确保您已打开该选项(使用-d< /code> 标志,或在
glassfish.yml
中)。Robert,
First off, I assume that you have followed instructions in http://gembundler.com/rails23.html. If not, make sure you do.
Second, make sure you are running
bundle
with JRuby:Third,
-P
requires daemonization, so make sure you have that option turned on (either with-d
flag, or inglassfish.yml
).确保您使用的是最新的 JRuby 1.5.5 或 master。由于 JRuby 传播环境的方式存在错误(或者在本例中没有),我们在捆绑执行和守护进程模式中都看到了类似的问题。
Make sure you are using the latest JRuby 1.5.5 or master. We saw a similar problem with both bundle exec and daemonize modes due to a bug in the way JRuby was propagating the environment (or not, in this case).
这实际上不再相关,因为我已经从那些特定版本中转移并且问题消失了。
This actually is no longer relevant as I've moved on from those particular versions and the problem disappeared.