一开始代码是用Rails 5编写的,然后又回到了rails 4.2.6(这也可能是我有这个问题的原因)
[2017-04-21 23:34:42] ERROR NoMethodError: undefined method `request_id' for #<ActionDispatch::Request:0x007f07e40a9310>
2017-04-21T23:34:42.159149+00:00 app[web.1]: Did you mean? request_method
2017-04-21T23:34:42.159151+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:63:in `block in compute_tags'
2017-04-21T23:34:42.159152+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:58:in `collect'
2017-04-21T23:34:42.159153+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:58:in `compute_tags'
2017-04-21T23:34:42.159153+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `call'
2017-04-21T23:34:42.159154+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2017-04-21T23:34:42.159154+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:in `call'
2017-04-21T23:34:42.159155+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/runtime.rb:18:in `call'
2017-04-21T23:34:42.159156+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2017-04-21T23:34:42.159157+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:120:in `call'
2017-04-21T23:34:42.159158+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/sendfile.rb:113:in `call'
2017-04-21T23:34:42.159158+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:518:in `call'
2017-04-21T23:34:42.159159+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:165:in `call'
2017-04-21T23:34:42.159160+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/lock.rb:17:in `call'
2017-04-21T23:34:42.159161+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/content_length.rb:15:in `call'
2017-04-21T23:34:42.159161+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.5/lib/rack/handler/webrick.rb:88:in `service'
2017-04-21T23:34:42.159162+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
2017-04-21T23:34:42.159163+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
2017-04-21T23:34:42.159164+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
答案 0 :(得分:0)
请分享您的宝石文件。 或者,请浏览Getting Started with Rails 4.x on Heroku文档,因为heroku在部署期间需要对gemfile进行少量更改。