【问题标题】:I'm getting a ERROR NoMethodError: undefined method `split' for nil:NilClass when I deploy to heroku当我部署到 Heroku 时,我收到 ERROR NoMethodError: undefined method `split' for nil:NilClass
【发布时间】:2014-04-17 21:30:00
【问题描述】:

我正在使用 Spree 2-2-stable 运行 rails 4.0.4。

在本地主机上一切正常,但是当我尝试登录管理员时

2014-04-17T21:23:58.859274+00:00 app[web.1]: [2014-04-17 21:23:58] 错误 NoMethodError: undefined method split' for nil:NilClass 2014-04-17T21:23:58.859274+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:69:inblock in service' 2014-04-17T21:23:58.859274+00:00 应用[web.1]:/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/utils.rb:451 :在block in each' 2014-04-17T21:23:58.859274+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/utils.rb:450:ineach' 2014-04-17T21:23:58.859274+00:00 应用程序 [web.1]:/app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/utils.rb:450 :在each' 2014-04-17T21:23:58.859274+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:63:inservice' 2014-04-17T21:23:58.859274+00:00 app[web.1]:/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in @987654325 @跑' 2014-04-17T21:23:58.859274+00:00 app[web.1]:/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block在 start_thread' 2014-04-17T21:23:58.870803+00:00 heroku[路由器]: at=info method=POST path=/admin/login host=vaporhop-staging.herokuapp.com request_id=8f86aa09-d55e-4405-9fc7-b5976870eacb fwd="108.6.136.145" dyno=web.1 connect=1ms service=102ms status=500 bytes=671

似乎与此相同的错误: http://dev.mensfeld.pl/2013/01/ruby-on-rails-webrick-error-nomethoderror-undefined-method-split-for-nilnilclass/

但他没有描述如何在 heroku 上修复它

【问题讨论】:

    标签: ruby-on-rails-4 rack spree webrick


    【解决方案1】:

    不知道为什么 heroku 一开始就使用 webrick,这很糟糕。我在生产组中有独角兽宝石,但它没有捡起它。然后我把它移到主组,我完成了这个教程https://devcenter.heroku.com/articles/rails-unicorn#adding-unicorn-to-your-application,问题就消失了

    【讨论】:

      猜你喜欢
      • 2020-09-24
      • 1970-01-01
      • 1970-01-01
      • 2015-03-19
      • 2016-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-02
      相关资源
      最近更新 更多