Forum: JRuby jruby command line scripts do not work with spaces in the path

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.
C61cad02bdbddcddee16d48e8af91221?d=identicon&s=25 Adam Murray (Guest)
on 2008-11-22 21:54
(Received via mailing list)
I am including a full installation of JRuby with some software I am
releasing. I'd like for my users to be able to install gems for
extensibility purposes. The problem is, I need to install JRuby under
a path with spaces in the name, and it seems the unix shell scripts do
not like that.

$ which jruby
/Users/adam/Downloads/test spaces/jruby-1.1.5/bin/jruby

$ jruby
Exception in thread "main" java.lang.NoClassDefFoundError:
spaces/jruby-1/1/5/lib/native/darwin

jgem, jirb, etc, give the same error.

It looks like quotes need to be put around the classpath paths? I
briefly tried adjusting the jruby shell script but I must have missed
something because I'm still getting the same error. I'll look into it
more later, but if anyone knows how to patch the scripts to fix this,
I'd appreciate some help.

Thanks,
Adam

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

    http://xircles.codehaus.org/manage_email
Bfe866459e40cb7392194ab08fcb5dea?d=identicon&s=25 Mike Herrick (mherrick66)
on 2008-11-22 22:03
(Received via mailing list)
Not sure if this is what you mean, but we do something similar with
TriSano.

This may or may not help:

Its *very* basic, but works:

Here is a link into our source tree:

https://trisano.csinitiative.net/source/browse/tri...

See:
install_jruby.sh
install_required_gems_jruby.sh

For reference:
http://www.trisano.org/collaborate/installationinstructions/
https://trisano.csinitiative.net/wiki/TriSanoDevel...

Our main goal was to make deployment simple for our customers & to be
able to easily reproduce any version of TriSano over time so we went
with this approach. It also lets us do the majority of our scripting in
rake/ruby since we just ship the source.

Mike

Mike Herrick
Program Manager, Collaborative Software Initiative
mike@csinitiative.com
Portland, Or 97258
http://www.csinitiative.com


Adam Murray wrote:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> Thanks,
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

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

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2008-11-23 19:27
(Received via mailing list)
Adam Murray wrote:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> spaces/jruby-1/1/5/lib/native/darwin
>
> jgem, jirb, etc, give the same error.
>
> It looks like quotes need to be put around the classpath paths? I
> briefly tried adjusting the jruby shell script but I must have missed
> something because I'm still getting the same error. I'll look into it
> more later, but if anyone knows how to patch the scripts to fix this,
> I'd appreciate some help.

Yeah, I'm not surprised this doesn't work. In order to support various
command-line options in the bash script, we re-assemble it by hand. I
think there's more work needed to fix that in the current scripts, and
we'd love help on that.

The other option would be having a real native launcher, but that brings
along its own problems (primarily wrt distribution).

- Charlie

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

    http://xircles.codehaus.org/manage_email
C61cad02bdbddcddee16d48e8af91221?d=identicon&s=25 Adam Murray (Guest)
on 2008-11-24 23:49
(Received via mailing list)
Thanks for the replies. I can help fix the scripts at some point. But
for the moment I'm just going to ignore this issue and let people
reconfigure my app to use an alternate installation of jruby if they
want to import additional gems and/or upgrade to the latest and
greatest jruby.

Mike, installing jruby is not the problem. All I want is for the bin
scripts (jruby, jgem) etc to work when there are spaces in the path.
If you download jruby and put it under a folder with a space in the
name, you will see what I mean. Unless I missed something, your
project didn't fix this, it just calls into the normal jruby bin
scripts that would have this problem.

-Adam

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

    http://xircles.codehaus.org/manage_email
Ba2f834cba243e6d678c06626d544918?d=identicon&s=25 Vladimir Sizikov (Guest)
on 2008-11-25 10:01
(Received via mailing list)
Adam,

A good start would be to file an JIRA issue for this (if there is none
filed yet), with version and platform details.

I'm about to start looking into this. I thought that we've already
fixed all such problems reported in the past (I even still have a
testing directory called 'JRuby with spaces') :)

Thanks,
  --Vladimir

On Mon, Nov 24, 2008 at 11:49 PM, Adam Murray <adamjmurray@gmail.com>
wrote:
> project didn't fix this, it just calls into the normal jruby bin
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
C61cad02bdbddcddee16d48e8af91221?d=identicon&s=25 Adam Murray (Guest)
on 2008-11-26 19:02
(Received via mailing list)
Vladimir,

Yes, I should have filed an issue, and now I have:

http://jira.codehaus.org/browse/JRUBY-3187

Adam

On Tue, Nov 25, 2008 at 1:00 AM, Vladimir Sizikov <vsizikov@gmail.com>
wrote:
>  --Vladimir
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.