Forum: Ruby Running JRuby

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
71afd863a146f154870cf3d582cb47d2?d=identicon&s=25 Peter Piper (Guest)
on 2006-03-03 11:21
Im trying to set up java and jruby on Windows, great work with the
recent developments.

In some of the recent examples of irb running on jruby it is ran like:

C:\rails>jruby C:\ruby\bin\irb

If I run this I get:

c:\ruby\bin\irb:10:in 'require': No such file to load -- irb (LoadError)
from c:\ruby\bin\irb:10"

I have set both JAVA_HOME and JRUBY_HOME.

Many thanks, Pete.

PS. When setting JRUBY_HOME enviroment var it appears it cant have any
spaces in the path, this is on Windows. And is most likly something to
do this 'DOS'.
F1d37642fdaa1662ff46e4c65731e9ab?d=identicon&s=25 Charles O Nutter (Guest)
on 2006-03-03 16:27
(Received via mailing list)
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

1. 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
2. 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
another day.

JRuby also has a user mailing list on, the jruby-user
list. Please join us and let us know if you have any more problems.
Thank you for trying JRuby!
F1d37642fdaa1662ff46e4c65731e9ab?d=identicon&s=25 Charles O Nutter (Guest)
on 2006-03-03 16:42
(Received via mailing list)
Sorry, that's, and I should probably be plugging instead, since that's the official home page. Sorry for
the mixup!
This topic is locked and can not be replied to.