繁体   English   中英

在heroku上部署Rails应用程序时遇到问题(该应用程序在本地运行良好)?

[英]Having issues with deploying Rails app on heroku( app works fine locally)?

最初,代码是用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'

请分享您的gemfile。 另外,请参阅Heroku文档中的Rails 4.x入门,因为heroku在部署过程中需要在gemfile中进行少量更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM