【问题标题】:Exception (anything) in PhusionPassenger::Rack::ApplicationSpawner on rails application in productionPhusionPassenger::Rack::ApplicationSpawner 中的异常(任何东西)在生产中的 Rails 应用程序中
【发布时间】:2013-03-29 01:33:50
【问题描述】:

很难解决的问题,至少对我来说是这样(知道 rails 的时间不长)。当我找到解决方案时,我会分享它,所以其他人不会像我一样浪费时间:)

在生产服务器中运行我的 rails 应用程序,在重新启动 apache 并尝试访问应用程序后,您会收到以下 错误

乘客遇到以下错误:

应用程序生成器服务器意外退出:连接被拒绝 - /tmp/passenger.1.0.16899/generation-0/spawn-server/socket.16909.15268580

异常类: PhusionPassenger::Rack::ApplicationSpawner::Error

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.2 passenger


    【解决方案1】:

    在我的一个应用程序文件(在本例中为帮助文件)中,我有以下代码:

    include ActionView::Helpers::TagHelper
    
    module MyHelper
       ...
    end
    

    rails server 的开发中运行良好,但在乘客中失败了。解决方案是将include 移动到模块内部,如下所示:

    module MyHelper
      include ActionView::Helpers::TagHelper
       ...
    end
    

    这对你们大多数人来说可能很明显,从现在开始对我来说也很明显:)

    【讨论】:

      猜你喜欢
      • 2012-11-11
      • 2016-09-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-22
      • 1970-01-01
      相关资源
      最近更新 更多