Anyone else having trouble stopping WEBrick?
All, first mad props to the development team. Loving the product - especially as my default was to try tun Aptana and I couldn't install it om my new Ubuntu system. So y'all have really made my life easier.
I am having a minor issue. When I start WEBRICK inside RubyMine, I get the following (as expected)
/usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/christopher/workspace/blog2/script/server webrick -p 3000 -b 127.0.0.1 -e development
=> Booting WEBrick...
=> Rails 2.2.2 application started on http://127.0.0.1:3000
=> Ctrl-C to shutdown server; call with --help for options
[2009-01-30 11:49:45] INFO WEBrick 1.3.1
[2009-01-30 11:49:45] INFO ruby 1.8.6 (2007-09-24) [i486-linux]
[2009-01-30 11:49:45] INFO WEBrick::HTTPServer#start: pid=15226 port=3000
However, when I CTRL-C to attempt to shut it down, it won't terminate. Eventually I have to close RubyMine and that kill -9 the jvm to shut it off.
My JDK_Home points here...
JDK_HOME=/usr/lib/jvm/java-6-sun/jre
If anything else is needed to help diagnose, I will be delighted to provide it.
Oh, also I have noticed that the Rails app under WEBrick is only available on the local machine not from a remote machine. However if I run WEBrick outside RubyMine, I have no trouble getting to my Rails app.
Any help greatly appreciated.
Chris
Please sign in to leave a comment.
Instead of Ctrl+C just press "Stop" button (red rectangle) at the left side of RubyMine console window (see "4: Run" tool window ).
Thanks for the response, but sadly that didn't do it either :-( I wondered if it had, but hadn't shown up on the console, but when I refresh the browser the app was still active.
Disappointing that there is still no definitive answer to this.
Chris,
Is the problem still actual in RubyMine #681 (latest EAP) ? It seems it's problems of your JVM. Other our Ubuntu users doesn't report about such problem. Also Oleg(member of our team) uses Ubuntu and in his case all works right.
I was running EAP 638, and just upgraded to 681. Slightly different behavior when I press the red button...
/usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/christopher/workspace/my-vitals/script/server default -p 3001 -b 0.0.0.0 -e development
=> Booting WEBrick...
=> Rails 2.2.2 application started on http://0.0.0.0:3001
=> Ctrl-C to shutdown server; call with --help for options
[2009-02-08 16:19:15] INFO WEBrick 1.3.1
[2009-02-08 16:19:15] INFO ruby 1.8.6 (2007-09-24) [i486-linux]
[2009-02-08 16:19:15] INFO WEBrick::HTTPServer#start: pid=20140 port=3001
[2009-02-08 16:19:23] ERROR SignalException: SIGTERM
/usr/lib/ruby/1.8/webrick/server.rb:91:in `select'
I now get that signal exception, but still am unable to shut down cleanly. So, I agree there must be something weird in my config. I am running java6-sun-1.6.0.07 .
If I shut down rubymine, it takes a couple of minutes to attempt to detach and then does shut down.
C
I'm having the same problem on Windows running Diana #749. My Ruby interpreter is jruby-1.2.0RC1 and java is jdk1.6.0_12. Pressing the stop button results in "Process finished with exit code 1", but in fact the process remains and the web server is still running.
-Swift
The latest version of JRuby is 1.6 may be switching to it will solve your problem. I didn't noticed such bugs on RubyMine #715 with JRuby 1.6 and Java 1.5 (MacOS). Also it seems it is java <-> ruby interaction problem, not RubyMine's one.
According to http://jruby.codehaus.org/ JRuby 1.2.0RC2 appears to be the latest version. Perhaps you are confusing 1.6 with 1.1.6. My version is only a couple of weeks old, works fine with NetBeans and appears to work fine for everything other than stopping WebRick in RubyMine. I don't think it's a problem with my JRuby.
Excuse me, obviously you are right
I'm having the same troubles on ubuntu 8.10, IntelliJ 8.1 build #9732 with ruby plugin build 2.0.225342.
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
[2009-03-26 10:59:08] INFO WEBrick 1.3.1
[2009-03-26 10:59:08] INFO ruby 1.8.7 (2008-08-11) [i486-linux]
=> Ctrl-C to shutdown server
(...) and when clicking red rectangle:
[2009-03-26 10:59:13] INFO WEBrick::HTTPServer#start: pid=11846 port=3000
[2009-03-26 11:00:59] ERROR SignalException: SIGTERM
/usr/lib/ruby/1.8/webrick/server.rb:91:in `select'
And i have to kill the process.
Still no solutions or other suggestions to solve this?
Yes, this is still a big problem for me. I tried it on a trial version of RubyMine 1.1.1 and 1.5. It also happens with the Intellij plugin. I am using java 1.6 and jruby 1.3.1
I have to kill the server through the task manager (yes, I am on Windows).
When I run the server from Cygwin, it shuts down just fine.
Like I said, this is a trial and my company may consider buying several licenses of RubyMine; we already have several Intellij licenses. But if this is what we have to deal with, then I will have to try another IDE.
Any help is appreciated.
-Rachel
Chris,
Do you still have this problem? If not, what was the resolution? I am still seeing it.
Thanks,
Rachel
I am seeing this with RubyMine 1364 build. I moved a project from Ruby Ruby to JRuby and
all seems good except for this nuisance. In my case the webrick doesn't seem to stop even
if I restart RubyMine. So the workarounds are (1) reboot or (2) change the port number assigned
to webrick or (3) grope about with the task manager and find the right javaw process to kill.
It definitely is still happening here. And it is a concern.
Windoze XP, JRuby 1.3.1
Hello Gordon,
We've fixed this problem a while ago, and the fix will be included in the
next EAP.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dmitry,
Excellent. Yes restarting WEBrick works fine for me in 1421.
Thanks,
Gordon