JRuby running on OS X 10.5.4?

I downloaded the BIN of JRuby 1.1.4 (jruby-bin-1.1.4.tar.gz) and
unzipped it into a directory under my home directory
(/User//jruby-1.1.4).

I have made sure that JRUBY_HOME points to /Users/me/jruby-1.1.4 and
that JAVA_HOME points to the Java 1.5.xx implementation on my machine.
When I then go to the bin folder in JRuby and type “./jruby” I get the
following:

Exception in thread “main” java.lang.NoClassDefFoundError:
org/jruby/Main

Having switched from a Win machine not too long ago it seems harder to
get JRuby running on my Mac. Any idea what I did wrong?


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Sep 2, 2008, at 4:45 PM, Michael F. wrote:

Main

Having switched from a Win machine not too long ago it seems harder
to get JRuby running on my Mac. Any idea what I did wrong?

This should be a FAQ.

When you invoke ./jruby from within the bin directory, the script
resets JRUBY_HOME so when it goes looking for its jars it cannot find
them. Also, it is likely you have ‘.’ in your $PATH which is incorrect
(remove it).

Make sure that $JRUBY_HOME/bin is in your $PATH. Change your current
working directory to anything other than JRUBY_HOME/bin and it will
work (just “cd” to somewhere else). This has been discussed before on
this list so feel free to search the archives if this still doesn’t
fix your problem.

cr


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Did you add $JRUBY_HOME/bin to the $PATH?

On Tue, Sep 2, 2008 at 3:45 PM, Michael F. [email protected]
wrote:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Cheers,

Kevin W.
http://kevwil.com/


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Chuck R. wrote:

This should be a FAQ.

Want to add it? :slight_smile:

When you invoke ./jruby from within the bin directory, the script resets
JRUBY_HOME so when it goes looking for its jars it cannot find them.
Also, it is likely you have ‘.’ in your $PATH which is incorrect (remove
it).

Pretty sure Chuck has hit the nail on the head. There’s actually an open
bug for this, and it’s almost entirely an issue contained within the
jruby bash script. Put the bin dir in PATH and run jruby as normal.
Removing . is optional, but recommended in general (google for reasons
why).

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Sep 2, 2008, at 6:18 PM, Charles Oliver N. wrote:

Chuck R. wrote:

This should be a FAQ.

Want to add it? :slight_smile:

This list has been very helpful to me, so I’m adding it to my list. :slight_smile:

cr


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This may be a result of using Java5 instead of Java6. Java6 was in a
recent
update, but if you don’t explicitly set it on OSX it won’t get used.
Here
are some good instructions for doing that:
http://lists.apple.com/archives/Java-dev/2005/Aug/msg00506.html

I hope that helps. I’m 90% sure it is the cause of your class not found
error.

On Tue, Sep 2, 2008 at 5:53 PM, Chuck R. [email protected]
wrote:

Exception in thread “main” java.lang.NoClassDefFoundError: org/jruby/Main
it is likely you have ‘.’ in your $PATH which is incorrect (remove it).


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


David Christiansen

[email protected]
www.techdarkside.com
317-966-6154 (mobile)