Yes, that paragraph is a bit too complicated and maybe not even needed
for the first-time users, I agree. We should probably improve that.
But the point is simple, all you need to do is to adjust your PATH so
that jruby script can be found and can be executed. No need to adjust
any other env variables.
as a new user to jruby I expected, that the main goal of “installing
jruby” and “get jruby running” http://wiki.jruby.org/wiki/Getting_Started is to have jruby installed
so that I can call
$ jruby
everywhere.
So I assume to have to set the env variables manually. That’s not a
problem per se. But what is the point this:
“We no longer recommended setting an environmental variable
$JRUBY_HOME to point to the location of your JRuby install. Now when
you run the jruby shell script it will automatically set $JRUBY_HOME
to the parent of the directory it was located in.”
Sorry - maybe I sound complicated but - just as feedback from a newbie
the wikisite “getting started” is a bit confusing to me.
Ben
On Tue, May 6, 2008 at 1:30 PM, Vladimir S. [email protected]
wrote:
Java HotSpot™ Client VM (build 1.5.0_13-119, mixed mode, sharing)
no, you don’t need to set the enviroment variable manually. What do you
expect to happen? As Vladimir wrote, the blank prompt indeed proofs
that jruby has been found. This behaviour is identical to ruby (the
original c version). Of course you are right that it is not very
useful. But JRuby is meant to be called with at least one parameter e.g.
the name of a ruby script. If you are looking for some kind of
interactive interpreter you need to use jirb / irb.
Or just type ‘jruby --version’ to see which version of jruby gets
called or ‘jruby --help’ to get some further information about
available parameters.
This is the common workaround when installing new software. But
reading the wiki gives you the impression, that the script sets the
variables.
All JRuby-internal variables are handled automatically now, indeed.
But you need to
adjust the PATH variable at least (so that the command shell would
know where to find the jruby script).
But you need to
adjust the PATH variable at least (so that the command shell would
know where to find the jruby script).
Ben,
I had done a bunch of the recent editing on the Getting Started page –
I’m sorry you fond it confusing and am glad you wrote about your
troubles. That page should be both as simple and as accurate as
possible.
As Valdimir said above executing the jruby script which starts jruby
DOES set all the environmental variables EXCEPT for JAVA_HOME (which
must be set before running jruby). Adding the JRuby bin/ directory to
your PATH environmental variable just makes it easier to execute.
If you add the jruby/bin dir to your path add it to the end of your PATH
not to the beginning. The reason is so that the ruby system scripts you
already have installed with the MRI Ruby installed in Leopard are found
first when you type their name. If you want to run the JRuby version of
rake initiate it like this: