Best way to work with jruby-complete.jar?

Hi,

so I am using jruby-complete.jar in my JSR223 stuff and on the command
line I have the
jruby install from macports. What is the best way to select everything
from jruby-complete.jar here?
Especially as I see bin/jruby etc. in the jar.
Do people actually unjar the jar to get at those files in bin/ or is
there a better way to use this
whole version of jruby?

I guess this is documented somewhere, but I did not yet find it.

Thanks
Heiko


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Unjarring is certainly one easy way to go :slight_smile:

Though it’s not necessarily canon, I find the simplest way to use jruby
from
my Mac’s command line is to use rvm: http://rvm.beginrescueend.com/
Once
you get this set up you can say “rvm use jruby” and it fixes up all the
normal ruby commands (ruby, rake, gem…) to point to JRuby. Currently,
once you have jruby-1.3.1 installed as a baseline, you can also add
other
recent revisions, e.g.: “rvm install jruby --rev 1.4.0RC1” and switch
back
and forth between JRuby versions with ease. Each Ruby version under
rvm, by
default, gets its own set of libraries and gems in your rvm directory,
so
things stay very organized.

I’m working on porting several Rails apps developed under various Ruby
1.8
revisions to JRuby, and rvm has been a lifesaver.

  • R

Another option is to use “java -jar <full-path-to-jruby-complete.jar>”.
That
is the equivalent of the JRuby command. If you want to do things like
IRB,
Gem, etc… you can use the -S command. For example:
java -jar jruby-complete-1.4.0RC1.jar -S irb
java -jar jruby-complete-1.4.0RC1.jar -S gem install jruby-openssl

If you install gems the will be installed in $HOME/.gem (unless you have
GEM_HOME or GEM_PATH set)

I use this since we use Maven, and I need to make sure I’m using the
same
JRuby .jar that we’re using in our project. I have the following alias
in my
shell:

alias mj ‘java -jar
$HOME/.m2/repository/org/jruby/jruby-complete/1.4.0RC1/jruby-complete-1.4.0RC1.jar’

-Mario.

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