jruby fails to run with nailgun support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
jruby (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
Ubuntu 16.04.1 LTS
jruby=1.
nailgun=0.9.1-3
I'm trying to run a ruby script using nailgun:
$ cat x.rb
#!/usr/bin/jruby
puts "Hello, world!"
$
$ jruby --ng-server &
[1] 5600
$ NGServer 0.9.1 started on all interfaces, port 2113.
$ jruby --ng x.rb
java.lang.
at java.net.
at java.lang.
at sun.misc.
at java.lang.
at java.lang.
at java.lang.
at com.martiansoft
This is due to the fact that nailgun checks its program name, and cannot be started as "ng" (the symlink in jruby package is named "ng"), only as "ng-nailgun":
$ ls -la /usr/share/
lrwxrwxrwx 1 root root 26 Oct 23 2015 /usr/share/
$ cd /usr/bin/
$ sudo ln -s ng-nailgun ng
$ ng
java.lang.
at java.net.
at java.lang.
at sun.misc.
at java.lang.
at java.lang.
at java.lang.
at com.martiansoft
$ ng-nailgun
NailGun v0.9.0
<...>
I don't know if this bug should be addressed to nailgun package or jruby package.
There was a similar bug in nailgun:
https:/
So, there are two options:
1. If it's considered as a bug in nailgun package, then you need to make nailgun able to run without checking the program name.
2. If it's a jruby package bug, then the following actions helped me:
i) Rename symlink to ng-nailgun:
$ cd /usr/share/
$ sudo mv ng ng-nailgun
ii) Using new symlink in jruby exec script:
$ cd
$ diff jruby.fixed_nailgun /usr/share/
335,336c335,336
< if [ -f $JRUBY_
< exec $JRUBY_
---
> if [ -f $JRUBY_
> exec $JRUBY_
338c338
< echo "error: ng-nailgun executable not found; run 'make' in ${JRUBY_
---
> echo "error: ng executable not found; run 'make' in ${JRUBY_
$ sudo cp jruby.fixed_nailgun /usr/share/
$ jruby --ng x.rb
Hello, world!
$
affects: | tomcat7 (Ubuntu) → jruby (Ubuntu) |