Differentiating JRuby executables from CRuby
2008.04.06 19:35Now that I’ve installed JRuby alongside CRuby, I have a hard time knowing which gem or rake I’m running.
I fix this by running this script from my .bashrc:
export JRUBY_HOME=/usr/local/jruby
export PATH=$PATH:$JRUBY_HOME/bin
if [ -d $JRUBY_HOME ]; then
for file in $JRUBY_HOME/bin/*; do
alias jruby_`basename $file`=$file
done
else
echo "$JRUBY_HOME not found"
fi
Then I can run jruby_gem or jruby_rake and know it’s legitimate.
category: code