JRuby, Rake and Windows

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-969 suggested 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

@echo off
jruby -S rake %*

Note: I find it convenient to symlink rake to jake to avoid conflicting with rake from MRI (Matz’s Ruby Interpreter).

Posted in jruby, ruby

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: