I found it a little annoying how an "org.jruby.Main" app would appear in the OS X dock when I did stuff like start the server, open a console or run the test suite. Running all this in parallel meant three separate apps in the dock. My colleagues experienced this also, but it didn't bother them enough to have looked into it.
I couldn't find anything on Google, strangely, but IRC was more helpful (thanks, nicksieger). I'm not familiar enough with JRuby to know if there is a better way, or if this has been changed in some later version than we're using, but:
jruby app takes a
--headless option, explained as "do not launch a GUI window, no matter what".
I run the test suite with
jake spec, where
jake is an alias:
alias jake='jruby -S rake'
To get rid of the dock action, I just changed this to
alias jake='jruby --headless -S rake'
Obviously, be careful with this if you expect to ever run non-headless stuff through
#!/usr/bin/env jruby --headless
I'm very new to JRuby, so please do correct me if I'm wrong, or suggest better solutions if they exist.