I’ve been writing a lot of JRuby lately to script a Java application.
I was getting the code to run on Windows for our developers who are not using OS X and Linux and ran into some trouble with Rake. The rake-0.7.3 gem is installed but the shell script c:\jruby-1.0\bin\rake doesn’t do me any good.
jruby -S rake which is cool. I wasn’t aware of jruby’s -S switch.
-S cmd run the specified command in JRuby’s bin dir
This was annoying to type so I created rake.cmd
jruby -S rake %*
Note: I find it convenient to symlink rake to jake to avoid conflicting with rake from MRI (Matz’s Ruby Interpreter).