Recently got a JRuby/Rails system with Java integration up and running. Unfortunately, it took quite a few hours, as most of the docs and code you find through Google are out of date.
If you use JRuby 0.9.2 from Codehaus, you will get an error similar to this when you try to access a rails application:
[2007-02-26 17:54:59] INFO WEBrick::HTTPServer start: pid=22540508 port=3000
<ArgumentError: Anonymous modules have no name to be referenced by>
If you're stuck in this rut, fear not! Nick Sieger has written very helpful instructions which outline how to get and set up the latest development snapshot. Please note that in addition to the instructions, you need to set your JRUBY_HOME environment variable. Under Windows, do something like this:
If you'd prefer not to use the snapshot, you can get the source code through subversion from:
but at the time of this post, you need to run svn checkout or update with "--ignore-externals" to avoid the following error:
Error: URL 'svn://rubyforge.org/var/svn/bfts/bfts/trunk' doesn't exist
Many thanks to Nick Sieger and the JRuby user mailing list for their help.