轨运行多个服务器更新到3.2.11中断(Rails Update to 3.2.11 breaks

2019-07-18 05:12发布

我们的应用程序在此互相交谈不同的端口上运行两个导轨的服务器。 使用Rails 3.2.8,我可以打开一个终端, cd的项目,运行rails s -p3000 ,打开另一个终端,运行rails s -p3001和一切工作正常。 该Gemfile中含有thin ,所以thin会自动启动,但使用的rails s将允许使用--debugger需要的时候。

由于更新了Rails 3.2.11此不再有效。 我得到一个错误:“A服务器已经运行Check /home/george/Projects/dashboard/tmp/pids/server.pid。” 我可以发动thin直接在两个端口,但随后没有调试支持。 启动thin上一个rails上的其他似乎不行,但现在还不清楚的是,当错误停止服务器的所有服务器任务是被杀。

Answer 1:

这两个命令都检查默认PID文件位置( tmp/pids/server.pid ),所以你会看到这个错误。 尝试运行多个服务器,如下所示:

服务器1: bundle exec rails s

服务器2: bundle exec rails s -p 3001 -P tmp/pids/server2.pid



Answer 2:

发布#2别处是提一句,如果你有轨3.2.11问题,请尝试锁定rack在1.4.1。 这似乎工作至今。 我说:

gem 'rack' , '1.4.1'

gemfile ,然后执行

bundle update rack


Answer 3:

尝试使用工头https://github.com/ddollar/foreman

Railscast: http://railscasts.com/episodes/281-foreman?view=comments



文章来源: Rails Update to 3.2.11 breaks running multiple servers