[jruby] issue with nailgun

Hi,

I have JRuby-9.1.17.0 installed on Linux-Red Hat Enterprise Linux Server 7.6 (Maipo).

I am trying to use nailgun to run some Ruby shell scripts from the command line
but I found a problem. STDOUT goes to the "jruby --ng-server" terminal,
instead of the terminal running "jruby --ng fooBar.rb".

Example.
1] Open 2 xterm: let's calle them xt1 and xt2
2] [xt1] > ssh foo@bar\.com 3\] \[xt1\] > jruby --ng-server
4] [xt2] > ssh foo@bar\.com 5\] \[xt2\] > jruby --ng -e 'puts "hello world"'

The problem is, "hello world" appears in terminal xt1, not in terminal xt2, as
one would expect.

In the examples you could find online, e.g. here:

the problem is not apparent because nailgun server and client run attached to the same
terminal.

Is there a simple way to fix this ? It would be most useful.

bye
Nicola

The solution to the issue can be found in this page:

I tested working for JRuby-9.2.6.0 in
FreeBSD-112, RedHat and Debian.

bye
n.

···

On 3/7/19 10:15 AM, Nicola Mingotti wrote:

Hi,

I have JRuby-9.1.17.0 installed on Linux-Red Hat Enterprise Linux Server 7.6 (Maipo).

I am trying to use nailgun to run some Ruby shell scripts from the command line
but I found a problem. STDOUT goes to the "jruby --ng-server" terminal,
instead of the terminal running "jruby --ng fooBar.rb".

Example.
1] Open 2 xterm: let's calle them xt1 and xt2
2] [xt1] $> ssh foo@bar.com
3] [xt1] $> jruby --ng-server
4] [xt2] $> ssh foo@bar.com
5] [xt2] $> jruby --ng -e 'puts "hello world"'

The problem is, "hello world" appears in terminal xt1, not in terminal xt2, as
one would expect.

In the examples you could find online, e.g. here:
JRuby Nailgun Support in 1.3.0 – Charles Oliver Nutter – Java, Ruby, and JVM guy trying to make sense of it all
the problem is not apparent because nailgun server and client run attached to the same
terminal.

Is there a simple way to fix this ? It would be most useful.

bye
Nicola