JRuby does not provide its own set of .rb libraries to run off; it
expects that you will have C Ruby available somewhere. Obviously this
allows us to run 90% of Ruby code and libraries exactly as C Ruby
does, since we both use the same .rb files. I believe you have two
- Try setting RUBY_HOME to the base directory of your C Ruby install
(i.e. where you would find bin, lib, and so on). The JRuby startup
script should be able to see that location and use the .rb files
- If that fails to work (let me know!), you can simply copy the C
Ruby .rb files into the JRuby distribution directory:
- copy %RUBY_HOME%\lib\ruby\1.8 directory as a whole into
%JRUBY_HOME%\lib\ruby, so you have %JRUBY_HOME%\lib\ruby\1.8
containing all the same files.
The second method is how most of the JRuby dev team runs JRuby, and it
works very well. It also keeps JRuby separate from your Ruby install,
so if you move or rename it JRuby will continue to work. It does,
however, require to you update those libraries if you install a newer
Ruby version. In the future, we hope to work out a way to distribute
JRuby with the standard Ruby .rb files, so it provides a complete,
working Ruby interpreter out-of-the-box…but that’s a discussion for
JRuby also has a user mailing list on sf.net/jruby, the jruby-user
list. Please join us and let us know if you have any more problems.
Thank you for trying JRuby!