jruby/jruby-rack — Issue #101: Broken with with jRuby 1.6.5+
Author: Mahaswami
Created: 2012-03-10 06:30:24+00:00
State: open

The complex / sequence and behavior to this issue:

Combination:

jRuby 1.6.7
jruby-rack 1.1.4 (via Warbler 1.3.3)

GlassFish 3.1

Ubuntu Oneric (Or latest Debian / older Ubuntu)
Plain Rails 3.0.8 with one sample "Hello World" view

Scenario 1:

Create new GlasshFish Domain and Deploy the WAR created by warble with context name FIRSTAPP.

Result: APP WORKS FINE

ENV Observation: At the time of newRuntime() of jRuby. Meaning no Rails related calls have been made yet. No Gem / Bundler / Ruby opts related entries found in ENV.

Scenario 2:

Simply restart the domain created in Scenario 1

Result: EXCEPTION. Gemfile is not found (Looking for Gemfile in GF domains config directory).

ENV Observation: At the time of newRuntime() of jRuby. Meaning no Rails related calls have been made yet. ENV['Gemfile'] is found.

Scenario 3:

Use the same Domain in previous scenarios. Delete the FIRSTAPP. Deploy the same as SECONDAPP context.

Result: EXCEPTION. bundler/setup not found.

ENV Observation: At the time of newRuntime() of jRuby. Meaning no Rails related calls have been made yet. ENV['GEM_HOME'] is pointing to the FIRSTAPP/WEB_INF/vendor/gems

The above means, the ENV changes made during the FIRSTAPPs deploy (via the META-INF/init.rb) in Scenario 1 persist throughout.