heroku Cedar-10をアップデートしたら動かなくなった件
こんなメールがherokuから来てたので、いまさらながらアップデートしてみたら、動かなくなったので対応した時のメモを残します。
On November 4th 2015, the Cedar-10 stack will reach its end-of-life. Cedar-14 is Heroku’s most modern stack and when we launched it one year ago, Cedar-10 was deprecated. After November 4th, the Cedar-10 stack will no longer receive security updates. You must migrate your app to Cedar-14 to ensure that it's running in a secure environment and we recommend that you do so as soon as possible. ・・・ To migrate an app, run the following commands: $ heroku stack:set cedar-14 $ git commit --allow-empty -m "Upgrading to Cedar-14" $ git push heroku master
示された通り上の3つのコマンドを実行してサイトを見たら、表示されなくなってました。。
heroku logs -t
でログを見ると、以下のようなエラーが。
2015-09-23T12:06:24.451899+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/backports-3.6.0/lib/backports/1.9.1/io/open.rb:2:in `close': Bad file descriptor - /app/vendor/bundle/ruby/2.0.0/gems/backports-3.6.0/lib/backports/1.9.1/io/open.rb (Errno::EBADF) ・・・ at=error code=H10 desc="App crashed" method=GET path="/" host=xxx request_id=582d403a-9a93-4785-9ce4-dc5029ff5680 fwd="xxx.xxx.xxx.xxx" dyno= connect= service= status=503 bytes=
こちら→ ruby - Dashing does not run on Heroku - Stack Overflow を見るとbackportをupdateするように書いてあったので、
$ bundle update backports $ git diff diff --git a/Gemfile.lock b/Gemfile.lock ・・・ - backports (3.6.0) + backports (3.6.6) ・・・ $ git add Gemfile.lock $ git commit -m 'update backports' $ git push heroku master
再度サイトにアクセスしたら表示されました。ログをtailしても、エラーは起きていませんでした。よかったよかった。