JRuby on Mac OS X vs. Ant Test

I’ve just started playing around with JRuby, starting off
with the first of the JRuby tutorials. Unfortunately, this very basic tutorial (mostly an installation guide) ran aground on OS X, 10.4. ant was complaining about not finding a junit task.

Skimming the copious text that ant spews forth on this error, I downloaded JUnit and installed junit-4.1.jar in ~/.ant/lib. No dice. ant was still its same bitchy self.

After a frustrating period of Googling1, I happened across a useful tip for setting up JAVA_HOME on Mac OS X. I tried that2, after having removed the junit jar file (trying to test one variable at a time.) Still no dice.

So for kicks, I tried putting the JUnit jar back in ~/.ant/lib, and the tests ran. Go figure.

1 Has no one tried running ant test on JRuby on OS X before now?

2 zsh/bash users: export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home