JRuby + Glassfish Gem + Bundler error
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 开发者_Python百科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?
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:
jruby -S bundle exec glassfish
Third, -P
requires daemonization, so make sure you have that option turned on (either with -d
flag, or in glassfish.yml
).
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.
精彩评论