How to run nailgun with JRuby/RubyMine on Windows 7?


I have a problem running nailgun in Windows 7.

Here is what I do
in a command window
     jruby --ng-server
"NGServer started on all interfaces, port 2113."

in Rubymine 5, using JRuby-1.7.3, I add the --ng flag to my run configuration to the 'Ruby arguments' field.

when running the configuration, in the Run: window a tab appears named Nailgun Server with this message:

     C:/Ruby/JRuby173/bin/jruby.exe --ng-server
     NGServer started on all interfaces, port 2113. Address already in use: JVM_Bind
      at Method)
      at Source)
      at Source)
      at Source)
      at Source)
      at<init>(Unknown Source)
      at<init>(Unknown Source)
      at Source)
      at Source)
     com.martiansoftware.nailgun.builtins.NGAlias: 0/0
     com.martiansoftware.nailgun.builtins.NGClasspath: 0/0
     com.martiansoftware.nailgun.builtins.NGServerStats: 0/0
     com.martiansoftware.nailgun.builtins.NGStop: 0/0
     com.martiansoftware.nailgun.builtins.NGVersion: 0/0
     NGServer shut down.

     Process finished with exit code 0

The configuration does run to completion after a while, but not at nailgun speed.
(I ran the same configuration on my OSX system, and there nailgun runs fine, with considerable reduction of start up time)

The above suggests that Rubymine attempts to launch another nailgun server instance,
so I tried to run the configuration from rubymine without launching a nailgun server from the command line first.

Indeed the first run of the configuration is OK
the second run of the configuration results in the same message as above.

So it seems that the nailgun server is good for only one run, which sort of defeats the purpose of nailgun.

How to remedy this?



Hi, Jennek!
What RubyMine build do you use?

This issue has already been fixed and nailgun should work fine on Windows now. The new EAP with nailgun support will be available later this week.


Hi Yuri,
Great to hear that it has been fixed. I am on 5.0.2.That's build 125.94.
I just found out about the youtrack entry for this
mentioning a fix for build 126.384, so I guess I have to wait for the next update?
Really looking forward to it


Yes, you are right. We will announce new RubyMine EAP soon.


Please sign in to leave a comment.