cucumber/cucumber — Issue #170: Running cucumber with jruby-complete jar
Author: rb2k
Created: 2011-11-09 12:23:18+00:00
State: open

I'm trying to bundle up something that can be used on our CI server.

Install bundler and jruby-openssl to a directory:
java -jar jruby-complete-1.6.5.jar -S gem install -i ./gems_to_inject bundler jruby-openssl --no-rdoc --no-ri
Pack the gems to a jar:
jar cf jruby_bundled_gems.jar -C gems_to_inject .
Make sure you don't point the GEM_PATH and GEM_HOME somewhere old. RVM sometimes does this:
unset GEM_HOME && unset GEM_PATH
Check to see if we have what we wanted:
java -jar jruby-complete-1.6.5.jar -rjruby_bundled_gems.jar -S jgem list
Install the bundle:
java -jar jruby-complete-1.6.5.jar -rjruby_bundled_gems.jar -S bundle install --path=jruby_gems

Now I should be set to go ahead and launch a cucumber run:

$ java -jar jruby-complete-1.6.5.jar -rjruby_bundled_gems.jar -S bundle exec cucumber
env: jruby: No such file or directory

I guess the problem is, that with the jar file, there is no matching env variable.
I tried to use the rake task and set t.fork = false, but that didn't seem to help :(

Any idea how to get cucumber to run with the jruby jar file?