Forum: JRuby JRuby 1.3.0 issue with warbler

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2009-06-07 13:57
(Received via mailing list)
I have trouble to use jruby 1.3.0 with warbler. If I create a war file
with
jruby 1.2.0, all succeed:

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ jruby -v
jruby 1.2.0 (ruby 1.8.6 patchlevel 287) (2009-03-16 rev 9419)
[i386-java]

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ jruby -S warble war
mkdir -p tmp/war/WEB-INF
jar cf carrierDB.war  -C tmp/war .



But If I upgrade to jruby 1.3.0 (switch my 'jruby' link from
'jruby-1.2.0'
to 'jruby-1.3.0'), the 'warble' command is unknow:

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ jruby -v
jruby 1.3.0 (ruby 1.8.6p287) (2009-06-03 5dc2e22) (Java HotSpot(TM)
Client
VM 1.5.0_16) [i386-java]

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ jruby -S warble war
jruby: No such file, directory, or command -- warble

Any idea what is wrong?

My environment is:

System Version:    Mac OS X 10.4.11 (8S2167)

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_16-b06-275)
Java HotSpot(TM) Client VM (build 1.5.0_16-132, mixed mode, sharing)

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $JRUBY_HOME
/opt/local/jruby

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $GEM_HOME
/opt/local/gem

Cheers,
Christian
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 AD (Guest)
on 2009-06-07 15:14
(Received via mailing list)
you likely need to install warble again in your jruby-1.3.0
installation.  Did you run jruby -S gem install warbler after changing
your symlink to jruby-1.3.0 ?

adam


On Sun, Jun 7, 2009 at 7:57 AM, Christian
Müller<christian.mueller@gmail.com> wrote:
>
>
>
> chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $JRUBY_HOME
> /opt/local/jruby
>
> chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $GEM_HOME
> /opt/local/gem
>
> Cheers,
> Christian
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2009-06-07 16:11
(Received via mailing list)
Hi Adam!

Thank you for your quick replay.
I don't install warbler again, because my GEM_HOME directory is outside
my
JRUBY_HOME directory (see my first mail). If I list all installed gems,
warbler will be listed:

chris:~ mullerc$ jruby -S gem list

*** LOCAL GEMS ***

actionmailer (2.3.2, 2.2.2)
actionpack (2.3.2, 2.2.2)
activerecord (2.3.2, 2.2.2)
activerecord-jdbc-adapter (0.9.1, 0.9)
activerecord-jdbcmysql-adapter (0.9.1, 0.9)
activeresource (2.3.2, 2.2.2)
activesupport (2.3.2, 2.2.2)
columnize (0.3.0, 0.2)
gem_plugin (0.2.3)
hoe (2.0.0, 1.12.2, 1.11.0, 1.8.3, 1.8.2)
jdbc-mysql (5.0.4)
jruby-openssl (0.5, 0.4, 0.3)
mislav-will_paginate (2.3.11, 2.3.8, 2.3.7, 2.3.6)
mocha (0.9.5, 0.9.3)
mongrel (1.1.5)
rails (2.3.2, 2.2.2)
rake (0.8.7, 0.8.4, 0.8.3)
rspec (1.2.6, 1.2.0, 1.1.11)
rubyforge (1.0.3, 1.0.1)
rubygems-update (1.3.4, 1.3.2, 1.3.1)
sources (0.0.1)
warbler (0.9.13, 0.9.11)
ZenTest (4.1.1, 4.0.0, 3.11.1, 3.11.0)

Any idea?

Christian
40e5e9fe36a1f85166493faac2c17499?d=identicon&s=25 Hirotsugu Asari (Guest)
on 2009-06-07 16:50
(Received via mailing list)
Christian,

warbler gem puts the 'warble' script in the same directory as the
'jruby' script.  It's not in the 1.3.0 directory.  Re-install warbler,
as Adam suggested.

Hiro

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2009-06-07 18:37
(Received via mailing list)
Hi Hiro!

The 'warble' script dosn't exist in my jruby-1.2.0/bin directry.

After I uninstalled warbler (all versions) and installed warbler again,
the
'warble' script dosn't exist in my jruby-1.3.0/bin directry. If I call
'jruby -S warble war', I receive the same error:
chris:~/workspaceExtJs/carrierDB2.0 mullerc$ jruby -S warble war
jruby: No such file, directory, or command -- warble

But the 'warble' script exists under '/opt/local/gem/bin'

chris:~/workspaceExtJs/carrierDB2.0 mullerc$ which warble
/opt/local/gem/bin/warble

If I change my JRUBY_HOME back to jruby-1.2.0 and call 'jruby -S warble
war', it works...

Christian
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-06-07 20:21
(Received via mailing list)
Christian Müller wrote:
> But the 'warble' script exists under '/opt/local/gem/bin'
>
> chris:~/workspaceExtJs/carrierDB2.0 mullerc$ which warble
> /opt/local/gem/bin/warble
>
> If I change my JRUBY_HOME back to jruby-1.2.0 and call 'jruby -S warble
> war', it works...

Is this a JRuby installed from a package, like from macports or apt-get
or something? In general the scripts for a gem are always installed
under <jruby home>/bin, so this other location seems pretty unusual.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
8838005371ab9c0b1d40f0504bf8832a?d=identicon&s=25 Gary S. Weaver (Guest)
on 2009-06-07 20:25
(Received via mailing list)
Note- I used this technique to include jruby 1.3.0 and jruby-rack with
warbler using jruby 1.3.0 and it worked fine in OS X and linux:

from
ttp://stufftohelpyouout.blogspot.com/2009/06/how-to-get-warbler-to-include-custom.html


      How to Get Warbler to Include a Custom Version of JRuby and
      JRuby-rack
      <http://stufftohelpyouout.blogspot.com/2009/06/how-...


If you want to use your own jruby-complete and jruby-rack jars in your
project, here's how to do it, thanks to Nick Sieger for example of how
to change the rack version.

In warble.rb, change this section so it looks like this: ||

  # Additional Java .jar files to include. Note that if .jar files are
placed
  # in lib (and not otherwise excluded) then they need not be mentioned
here.
  # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include
your
  # own versions if you directly set the value
  # config.java_libs += FileList["lib/java/*.jar"]
  config.java_libs.delete_if {|f| f =~ /jruby-rack/ || f =~
/jruby-complete/ }
  config.java_libs += FileList["lib/jruby-complete*.jar"]
  config.java_libs += FileList["lib/jruby-rack*.jar"]

That will let you put your own version of jruby rack and jruby complete
into your lib/ dir.

Then get and build jruby via git clone git://github.com/jruby/jruby.git.
You'll need Ant <http://ant.apache.org/> 1.7+ (I used 1.7.1) and Git.
Then run "ant jar-complete" and copy jruby-complete.jar from the lib
directory under the checked-out jruby. Use the jruby-rack jar you want
also, for example "(jruby
version)/lib/ruby/gems/1.8/gems/warbler-0.9.13/lib/jruby-rack-0.9.4.jar",
or you could check it out and built it as well if you wanted.

Note that you might want to blow away your tmp dir, existing war, as
well undeploy the webapp, etc. to clean up first.

Don't forget that if you are using that version of jruby in the app,
you'll want to use it in tests also. Make sure your JRUBY_HOME env var
is pointed to a symlink that is pointed to the jruby dir from git. And
make sure your PATH includes $JRUBY_HOME/bin.


Christian Müller wrote:
>
>
>
> chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $JRUBY_HOME
> /opt/local/jruby
>
> chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $GEM_HOME
> /opt/local/gem
>
> Cheers,
> Christian

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
526d60de6472502bb570a9df2842b33b?d=identicon&s=25 Nick Sieger (Guest)
on 2009-06-07 21:00
(Received via mailing list)
On Sun, Jun 7, 2009 at 6:57 AM, Christian
Müller<christian.mueller@gmail.com> wrote:
>
>
>
> chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $JRUBY_HOME
> /opt/local/jruby
>
> chris:~/workspaceExtJs/carrierDB2.0 mullerc$ echo $GEM_HOME
> /opt/local/gem

Another option which hasn't been mentioned yet is to try adding
$GEM_HOME/bin to your path, so that the binary scripts are there.

/Nick

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2009-06-07 22:25
(Received via mailing list)
Hi Nick!

The '$GEM_HOME/bin' was in my path:

chris:~ mullerc$ echo $GEM_HOME
/opt/local/gem

chris:~ mullerc$ $PATH
-bash:
./:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/local/jruby/bin:/opt/local/gem/bin:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin

Christian
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2009-06-07 22:35
(Received via mailing list)
Hi Charlie!

This isn't a package installation. I downloaded the binary distribution
of
jruby-1.3.0 and unpacked it. The only thing which is maybe not the
default
is, that I defined GEM_HOME in a directory which is not under the jruby
installation. The reason for that is, that I don't want to install all
gems
again, if I upgrade jruby.
My JRUBY_HOME points to a directory, which is a link to the actual jruby
version I used:

chris:/opt/local mullerc$ ls -la
total 16
drwxr-xr-x    18 root     admin     612 Jun  7 18:34 .
drwxr-xr-x     3 root     wheel     102 Jun  5 18:18 ..
drwxrwxrwx     7 root     admin     238 Dec 17 23:45 gem
lrwxr-xr-x     1 root     admin      12 Jun  7 18:34 jruby ->
jruby-1.2.0/
drwxr-xr-x    12 root     admin     408 Dec 17 23:36 jruby-1.1.6
drwxrwxrwx    12 mullerc  mullerc   408 Apr 15 21:25 jruby-1.2.0
drwxrwxrwx    13 mullerc  mullerc   442 Jun  5 18:16 jruby-1.3.0
...

Christian

On Sun, Jun 7, 2009 at 8:21 PM, Charles Oliver Nutter <
F1d37642fdaa1662ff46e4c65731e9ab?d=identicon&s=25 Charles Nutter (headius)
on 2009-06-09 01:46
(Received via mailing list)
Christian Müller wrote:
> chris:/opt/local mullerc$ ls -la
> total 16
> drwxr-xr-x    18 root     admin     612 Jun  7 18:34 .
> drwxr-xr-x     3 root     wheel     102 Jun  5 18:18 ..
> drwxrwxrwx     7 root     admin     238 Dec 17 23:45 gem
> lrwxr-xr-x     1 root     admin      12 Jun  7 18:34 jruby -> jruby-1.2.0/
> drwxr-xr-x    12 root     admin     408 Dec 17 23:36 jruby-1.1.6
> drwxrwxrwx    12 mullerc  mullerc   408 Apr 15 21:25 jruby-1.2.0
> drwxrwxrwx    13 mullerc  mullerc   442 Jun  5 18:16 jruby-1.3.0
> ...

Hmm, then it's pretty peculiar that it installs in that other directory.
Can you confirm where installing a new gem with your new jruby-1.3.0
actually puts it?

I think your best bet may be to force things to a specific gem root/home
and reinstall what you had before.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Afcbc505100242cabd5f8eba7d7e793b?d=identicon&s=25 Christian Mueller (muellerc)
on 2009-06-11 23:25
(Received via mailing list)
Hi Charie!

After I definded a new GEM_HOME and installed all needed gems, it works.
Thank you! I don't know, what goes wrong with my old GEM_HOME...

Christian

On Tue, Jun 9, 2009 at 1:45 AM, Charles Oliver Nutter
This topic is locked and can not be replied to.