gpt4 book ai didi

ruby-on-rails - 为什么将 Rails 升级到 6.0.0 后 Heroku Rails App 会崩溃?

转载 作者:行者123 更新时间:2023-12-04 03:51:58 25 4
gpt4 key购买 nike

我有一个成功上传到 Heroku 的应用程序,一切正常。使用 rails app:update 更新后从版本 6.0.0rc1 到 6.0.0 的命令,我将应用程序部署到 heroku 之后,当服务器启动时 Heroku 崩溃了。

2019-08-20T12:45:56.047319+00:00 heroku[web.1]: State changed from crashed to starting
2019-08-20T12:46:01.995009+00:00 heroku[web.1]: Starting process with command `bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}`
2019-08-20T12:46:04.051365+00:00 app[web.1]: Puma starting in single mode...
2019-08-20T12:46:04.051387+00:00 app[web.1]: * Version 3.12.1 (ruby 2.6.1-p33), codename: Llamas in Pajamas
2019-08-20T12:46:04.051389+00:00 app[web.1]: * Min threads: 5, max threads: 5
2019-08-20T12:46:04.051390+00:00 app[web.1]: * Environment: production
2019-08-20T12:46:08.886669+00:00 heroku[web.1]: State changed from starting to crashed
2019-08-20T12:46:08.769945+00:00 app[web.1]: * Listening on tcp://0.0.0.0:32178
2019-08-20T12:46:08.770225+00:00 app[web.1]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.6.0/bin/puma)
2019-08-20T12:46:08.770272+00:00 app[web.1]: Errno::ENOENT: No such file or directory @ rb_sysopen - tmp/pids/server.pid
2019-08-20T12:46:08.770276+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:133:in `initialize'
2019-08-20T12:46:08.770277+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:133:in `open'
2019-08-20T12:46:08.770278+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:133:in `write_pid'
2019-08-20T12:46:08.770280+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:106:in `write_state'
2019-08-20T12:46:08.770281+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/single.rb:103:in `run'
2019-08-20T12:46:08.770282+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:186:in `run'
2019-08-20T12:46:08.770284+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/cli.rb:80:in `run'
2019-08-20T12:46:08.770285+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/bin/puma:10:in `<top (required)>'
2019-08-20T12:46:08.770287+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/bin/puma:23:in `load'
2019-08-20T12:46:08.770289+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/bin/puma:23:in `<top (required)>'
2019-08-20T12:46:08.867275+00:00 heroku[web.1]: Process exited with status 1

出于某种原因, tmp/pids/server.pid服务器启动时不会创建。

你能帮我解决这个问题吗?
我在谷歌中没有找到解决方案

最佳答案

好的,我通过删除行 pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } 解决了这个问题来自 config/puma.rb这是在 rails 升级期间添加的 :)

关于ruby-on-rails - 为什么将 Rails 升级到 6.0.0 后 Heroku Rails App 会崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57574694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com