Newbie: Help with jruby installation

I have downloaded the “complete” version of jruby downloadable on
windows.

What am I supposed to do with it?

I have unzipped it and began using the executables e.g. gem, bundle,
etc.

Every one of them complains about ClassNotFoundException for
org.jruby.Main.

So I bundled up all of the class files in the various dirs
org/com/jline/jay/etc into a new jruby.jar and pre-pended to the .bat
files. Now some things work (e.g. gem works…) But others -such as
bundle - do not.

Clearly this is too much work, and there is a basic installation
procedure I’m missing.

I would recommend downloading the Windows Executable version and going
through the install process

Kyle W. wrote in post #976854:

I would recommend downloading the Windows Executable version and going
through the install process

I did go that direction in the interim. Where is information on how to
use the “raw” complete version?

what are you trying to do with the “raw complete version” that you
cant do with the regular windows install?

Jay McGaffigan wrote in post #976873:

what are you trying to do with the “raw complete version” that you
cant do with the regular windows install?

understand how it is put together and if there were pieces there beyond
what the packaged version from windows provides.

So … would you point me to a few sentences explaining the structure of
this “complete” package? Typically i look for a build.xml or pom.xml
(or going back further make flavors) but did not see them in this case.

On Sat, Jan 22, 2011 at 11:47 PM, Stephen B. [email protected]
wrote:

So … would you point me to a few sentences explaining the structure of
this “complete” package?

Why not just un-jar it and see? :slight_smile:


Hassan S. ------------------------ [email protected]
twitter: @hassan

Hassan S. wrote in post #976929:

On Sat, Jan 22, 2011 at 11:47 PM, Stephen B. [email protected]
wrote:

So … would you point me to a few sentences explaining the structure of
this “complete” package?

Why not just un-jar it and see? :slight_smile:


Hassan S. ------------------------ [email protected]
twitter: @hassan

Pls read my original post more carefully. I mentioned a number of things
that would not have been possible had I not unjar’ed this, including
re-jarring the .class files and running various binaries.

The responses to this question so far have implied that I had not done
“my homework” before asking it. That is not the case. The original post
did mention some steps that had been taken. Here is some more info.

The only build related scripts that I can find are maven pom.xml’s
buried deep in the META-INF directory under subdirectories of individual
projects.

There is no over-arching pom.xml (what about building/deploying ‘all’ ?)

Even when going to the META-INF/maven/XXX directories and running “mvn
install” on individual project, they fail. The one I just tried could
not find artifacts from the configured maven repo.

So I’m spending time on trying to reverse engineer this process.

It would not seem an unreasonable step to try to short-circuit that
effort, and query this forum for a tip pointing the way to deciphering
the overall build structure.

Stephen,

Your original question is:

I have downloaded the “complete” version of jruby downloadable on
windows.

What am I supposed to do with it?

It’s a jar file. You’d use it just as you would any other jar file.

$ java -jar jruby-complete.jar -S irb
irb(main):001:0> RUBY_DESCRIPTION
=> “jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-23 517349e)
(Java HotSpot™ 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]”

or even ‘java -jar jruby-complete.jar -h’ would have given you some
ideas.

I have unzipped it and began using the executables e.g. gem, bundle,
etc.

Every one of them complains about ClassNotFoundException for
org.jruby.Main.
Your classpath is not set correctly.

So I bundled up all of the class files in the various dirs
org/com/jline/jay/etc into a new jruby.jar and pre-pended to the .bat
files. Now some things work (e.g. gem works…) But others -such as
bundle - do not.

Clearly this is too much work, and there is a basic installation
procedure I’m missing.
Can you show me where you get the idea that this is going to work as you
expected? Obviously we need to improve the documentation so that it is
easier to figure out what to do.

Finally, if you really want to know the difference between jruby.jar
(which is a part of the Windows installer) and jruby-complete.jar, you’d
be best advised to look at build.xml from the JRuby source.

Hirotsugu A. wrote in post #976939:

Stephen,

Your original question is:

I have downloaded the “complete” version of jruby downloadable on
windows.

What am I supposed to do with it?

It’s a jar file. You’d use it just as you would any other jar file.

$ java -jar jruby-complete.jar -S irb
irb(main):001:0> RUBY_DESCRIPTION
=> “jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-23 517349e)
(Java HotSpot™ 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java]”

or even ‘java -jar jruby-complete.jar -h’ would have given you some
ideas.

I have unzipped it and began using the executables e.g. gem, bundle,
etc.

Every one of them complains about ClassNotFoundException for
org.jruby.Main.
Your classpath is not set correctly.

So I bundled up all of the class files in the various dirs
org/com/jline/jay/etc into a new jruby.jar and pre-pended to the .bat
files. Now some things work (e.g. gem works…) But others -such as
bundle - do not.

Clearly this is too much work, and there is a basic installation
procedure I’m missing.
Can you show me where you get the idea that this is going to work as you
expected? Obviously we need to improve the documentation so that it is
easier to figure out what to do.

Finally, if you really want to know the difference between jruby.jar
(which is a part of the Windows installer) and jruby-complete.jar, you’d
be best advised to look at build.xml from the JRuby source.

Hi Hirotsugu,
Thanks for the reply - finally a response that answers the question.

Can you show me where you get the idea that this is going to work as you
expected?

When I introspected the jar (jar -tvf) after downloading it, and seeing
various (buried) pom.xml’s, I got the wrong impression: did not think it
were an executable jar file.

Looking more closely it’s just that the included pom.xml’s are part of
separately distributed java project components that have been bundled
into the jruby dist.

Thanks again for the reply/explanation.

Sorry… I was completely misunderstanding what you were asking. Hiro
to the rescue.

Jay

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs