Jruby +Glassfish + Bundler problem

I posted this over at StackOverflow and got some help, but didnt solve
the
problem. Below is the original text:

========

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?

From:
ruby on rails - JRuby + Glassfish Gem + Bundler error - Stack Overflow

After working through the suggestions, I came to this:

If I turn off the daemon setting, the app doesn’t error on Bundler.

Any ideas on why that would be the problem? If I dont use the daemonize
setting, Ill get the Please wait while Glassfish loads the application
screen.

As a work around you may want to try installing the glassfish gem in to
your system jruby, instead of the bundle. Then start it up with jruby
-S glassfish … instead of the bundle exec way.

From: Robert R. [mailto:[email protected]]
Sent: Tuesday, November 23, 2010 8:59 AM
To: [email protected]
Subject: [jruby-user] Jruby +Glassfish + Bundler problem

I posted this over at StackOverflow and got some help, but didn’t solve
the problem. Below is the original text:

========

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?

From:
ruby on rails - JRuby + Glassfish Gem + Bundler error - Stack Overflow
rror

After working through the suggestions, I came to this:

“If I turn off the daemon setting, the app doesn’t error on Bundler.”

Any ideas on why that would be the problem? If I don’t use the daemonize
setting, I’ll get the “Please wait while Glassfish loads the
application” screen.

I replied on the SO thread and I don’t have any new ideas except to
say that there’s a bug here somewhere either in Bundler, JRuby, or
Glassfish. Do you have the same problem with Trinidad or WEBrick?

/Nick

I don’t know Trinidad, but I didn’t have a problem with WEBrick.

I updated Bundler to its newest version and the problem seems to have
gone
away locally. I haven’t tested on the server yet.

I’m working through another issue where a file in the lib directory
isn’t
being loaded under JRuby, but is fine under MRI.