Skip to content

Instantly share code, notes, and snippets.

@lachie
Created September 3, 2012 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lachie/3614674 to your computer and use it in GitHub Desktop.
Save lachie/3614674 to your computer and use it in GitHub Desktop.
JRuby favours scripts on PATH
  • put test.sh into a folder and cd into the folder.
  • put jruby-complete-1.7.0.preview2.jar into same folder, or tweak JRUBY var to point to where it lives.
  • run it with bash test.sh
JRUBY=./jruby-complete-1.7.0.preview2.jar
rm -rf bin
mkdir -p bin
cat <<BINFILE > bin/gem
puts "I am not really gem"
p ARGV
BINFILE
chmod 0755 bin/gem
PATH=./bin:$PATH
export PATH
java -cp $JRUBY org.jruby.Main -S gem list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment