Details
Description
YAML is part of the Ruby 1.9 so,
jruby --1.9 -e "require 'yaml'"
succeeds.
If the NailGun server is started,
jruby --1.9 --ng-server &
YAML can still be required if not using the NailGun client.
jruby --1.9 -e "require 'yaml'"
succeeds
But it cannot be required if using the NailGun client.
$ jruby --1.9 --ng -e "require 'yaml'" LoadError: no such file to load -- yaml require at org/jruby/RubyKernel.java:1038 (root) at -e:1
Either the client is not setting the correct mode, the server doesn't honor the version required by the client or by the NailGun start command, or NailGun somehow interferes with the loading of the 1.9 modules.
This patch solve the issue for me
diff --git bin/jruby.bash bin/jruby.bash index 731f85e..edfe665 100644 --- bin/jruby.bash +++ bin/jruby.bash @@ -343,7 +343,7 @@ fi if [ "$nailgun_client" != "" ]; then if [ -f $JRUBY_HOME/tool/nailgun/ng ]; then - exec $JRUBY_HOME/tool/nailgun/ng org.jruby.util.NailMain "$@" + exec $JRUBY_HOME/tool/nailgun/ng org.jruby.util.NailMain $mode "$@" else echo "error: ng executable not found; run 'make' in ${JRUBY_HOME}/tool/nailgun" exit 1The issue was that the $mode in the jruby.bash script was being lost when using the 'ng' command, and therefore the client was not using the 1.9 compatible mode.