Archive for July, 2007

Debugging JRuby with Netbeans 6

July 27, 2007

Debugging JRuby with NetbeansĀ 6

I do most of my Ruby development in TextMate and Java development in IntelliJ, but both have quirks with JRuby. I’ve been checking out Netbeans 6 M10 and the Netbeans Ruby IDE. There are some nice features and great JRuby support.

I was having a problem tracking down a bug in my JRuby code. I fired up Netbeans, set a break point and stepped though the code. It worked great, I found the problem immediately.

JRuby, Rake and Windows

July 25, 2007

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).