简体   繁体   English

将JRuby与Nailgun一起使用时如何停止/启动rails / webrick?

[英]How to stop/start rails/webrick when using JRuby with nailgun?

This is probably a stupid question, but not having much joy researching it myself. 这可能是一个愚蠢的问题,但是我自己对其进行研究并不高兴。

Using JRuby 1.6.4 on OSX (Snow Leopard) installed via rvm. 在通过rvm安装的OSX(雪豹)上使用JRuby 1.6.4。

I have enabled nailgun . 启用了钉枪

Can start rails/webrick (rails s) and things seem fine. 可以启动rails / webrick(rails),并且看起来一切正常。

Now I want to stop/start rails - how do I do that? 现在我想停止/启动护栏-我该怎么做?

I did the usual Control-C, which looks to kill the rails command - however, as its really running on the background nailgun daemon, its not killed. 我执行了通常的Control-C,它看起来会杀死rails命令-但是,由于它确实在后台nailgun守护程序上运行,因此并未被杀死。

If I restart rails now, I get an error about port 3000 in use - its trying to start a second webrick. 如果现在重新启动Rails,则会收到有关正在使用的端口3000的错误-它试图启动第二个Webrick。

If I kill the background daemon (using kill), JRuby then fails to start (connection refused). 如果我杀死后台守护程序(使用kill),那么JRuby无法启动(连接被拒绝)。 Starting a new terminal window seems to fix this. 启动新的终端窗口似乎可以解决此问题。

This doesnt seem like the right way to be doing this, but what is? 这似乎不是执行此操作的正确方法,但这是什么?

I have looked at Headius' guide and the Nailgun project page - but neither go that far... 我看过Headius的指南Nailgun项目页面 -但都走得太远...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM