【问题标题】:'rails server' starts thin twice, shuts both down. Cucumber still works'rails server' 启动两次,都关闭。黄瓜仍然有效
【发布时间】:2013-03-31 18:45:57
【问题描述】:

我的 rails 应用程序无法在开发模式下启动。它似乎在生产和测试模式下都有效。这是我运行“rails server”时得到的结果:

Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:51960, CTRL+C to stop
Booting Thin
Rails 3.2.11 application starting in development on http://0.0.0.0:3000
Call with -d to detach
Ctrl-C to shutdown server
Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
Exiting

我发现的一个线索是,每次调用 rails 之前似乎都开始变薄了。例如,当我调用 rails 控制台时会发生以下情况:

Thin web server (v1.5.1 codename Straight Razor)
Maximum connections set to 1024
Listening on 0.0.0.0:52262, CTRL+C to stop
Loading development environment (Rails 3.2.11)

此错误已出现在两台不同的计算机上。第一个(macbook)我只是将 github 存储库克隆到一个新文件夹中并从那里启动它,修复一些东西(如何?不确定)。第二台计算机 (iMac) 对此没有响应。

我正在使用 ruby​​ 1.9.3、rails 3.2 和 Thin 1.5.1。

更神秘的是,从我的 gemfile 中删除 thin 并不能修复错误。 Rails 仍然使用 Thin 启动。在我的项目的其余部分中,我找不到对 Thin 的直接引用。

请原谅我对 Rails 和 Web 服务器内部的相对无知。关于可能导致此问题的任何想法?

PS 我知道this SO question 并且那里的解决方案对我不起作用。

【问题讨论】:

    标签: ruby-on-rails webserver thin


    【解决方案1】:

    我找到了原因。我在开发和测试中都在运行 gem 'fake_braintree'。它仅在测试中运行。当它运行时,它会启动一个与我要运行的瘦服务器冲突的瘦服务器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-26
      • 2012-07-06
      • 2018-06-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多