質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

解決済

2回答

1022閲覧

heroku デプロイ後 H10エラー

mimisenn

総合スコア13

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

1グッド

1クリップ

投稿2020/03/12 15:51

前提・実現したいこと

herokuを使用してRuby_on_Railsを使用したアプリを公開したい

発生している問題・エラーメッセージ

①heroku上でもデプロイ後はBuild succeededが表示されるので成功している。
②heroku openをターミナルで打ち込むとapplication errorが表示される
③heroku logs --tailで詳細を見るとH10のエラーが発生している
④heroku restart --app application_nameは実行しその他サイトをみて試してみるが一向に同様のことで問題を抱えているサイトが見つからない。

エラーメッセージ remote: ###### WARNING: remote: remote: You set your `config.active_storage.service` to :local in production. remote: If you are uploading files to this app, they will not persist after the app remote: is restarted, on one-off dynos, or if the app has multiple dynos. remote: Heroku applications have an ephemeral file system. To remote: persist uploaded files, please use a service such as S3 and update your Rails remote: configuration. remote: remote: For more information can be found in this article: remote: https://devcenter.heroku.com/articles/active-storage-on-heroku remote: remote: remote: remote: ###### WARNING: remote: remote: We detected that some binary dependencies required to remote: use all the preview features of Active Storage are not remote: present on this system. remote: remote: For more information please see: remote: https://devcenter.heroku.com/articles/active-storage-on-heroku remote: remote: remote: remote: remote: -----> Discovering process types remote: Procfile declares types -> web remote: Default types for buildpack -> console, rake remote: remote: -----> Compressing... remote: Done: 72.3M remote: -----> Launching... remote: Released v10 remote: https://portforio-ak.herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done.

該当のソースコード

2020-03-12T14:08:57.172807+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb --log-file -` 2020-03-12T14:08:58.000000+00:00 app[api]: Build succeeded 2020-03-12T14:08:59.725202+00:00 heroku[web.1]: State changed from starting to crashed 2020-03-12T14:08:59.731342+00:00 heroku[web.1]: State changed from crashed to starting 2020-03-12T14:08:59.651162+00:00 app[web.1]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.5.0/bin/puma) 2020-03-12T14:08:59.651184+00:00 app[web.1]: OptionParser::InvalidOption: invalid option: --log-file 2020-03-12T14:08:59.651184+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/puma-3.12.4/lib/puma/cli.rb:50:in `initialize' 2020-03-12T14:08:59.651185+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/puma-3.12.4/bin/puma:8:in `new' 2020-03-12T14:08:59.651185+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/puma-3.12.4/bin/puma:8:in `<top (required)>' 2020-03-12T14:08:59.651185+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/bin/puma:23:in `load' 2020-03-12T14:08:59.651186+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/bin/puma:23:in `<top (required)>' 2020-03-12T14:08:59.709334+00:00 heroku[web.1]: Process exited with status 1 2020-03-12T14:09:03.726964+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb --log-file -` 2020-03-12T14:09:07.358291+00:00 heroku[web.1]: State changed from starting to crashed 2020-03-12T14:09:07.263236+00:00 app[web.1]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.5.0/bin/puma) 2020-03-12T14:09:07.263272+00:00 app[web.1]: OptionParser::InvalidOption: invalid option: --log-file 2020-03-12T14:09:07.263280+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/puma-3.12.4/lib/puma/cli.rb:50:in `initialize' 2020-03-12T14:09:07.263280+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/puma-3.12.4/bin/puma:8:in `new' 2020-03-12T14:09:07.263280+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/gems/puma-3.12.4/bin/puma:8:in `<top (required)>' 2020-03-12T14:09:07.263281+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/bin/puma:23:in `load' 2020-03-12T14:09:07.263281+00:00 app[web.1]: /app/vendor/bundle/ruby/2.5.0/bin/puma:23:in `<top (required)>' 2020-03-12T14:09:07.340113+00:00 heroku[web.1]: Process exited with status 1 2020-03-12T14:09:55.346743+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=portforio-ak.herokuapp.com request_id=d44a3ad8-caf5-4c52-b12c-f1aa4536a811 fwd="61.117.212.161" dyno= connect= service= status=503 bytes= protocol=https 2020-03-12T14:09:55.747859+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=portforio-ak.herokuapp.com request_id=4b45e1d2-7e73-49ea-b135-4858897023e5 fwd="61.117.212.161" dyno= connect= service= status=503 bytes= protocol=https

試したこと

heroku restart --app application_nameの実行
heroku run rails consoleを開くがエラーが吐き出されない
brew install yarnをしてbundle exec rake assets:precompile RAILS_ENV=production実行し
再度デプロイをするが変わらず。

S3など使っていないので、warningはとりあえず無視しても大丈夫かと思っていたが違うのか?
明確なエラーが表示されてこないので、どうしていいのかわからず詰まっております。

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

s.k👍を押しています

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

「bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.5.0/bin/puma)」
で検索しただけなので詳しいことは分かっていませんが…

2:pumaに切り替えてHerokuを起動するとApp Errorとなる問題

投稿2020/03/13 01:44

no1knows

総合スコア3365

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

mimisenn

2020/03/13 09:18

様々参考にさせていただいて、何とかアプリケーションエラーそのものは解消されました! 次はWe're sorry, but something went wrong.が出てますが、もう少し自身で調べてみます。 どうしてもダメでしたら、その際はご教授お願いします。
no1knows

2020/03/13 09:36

それはよかったです。 もし可能であれば、今後、同じエラーが出た人がこのページを見たときに、どうやれば解決したのかわかるように記載いただけると幸いです。
guest

0

Procfileに

procfile

1web: bundle exec puma -C config/puma.rb --log-file -

と書かれているようなら、後ろの--log-file -を消してください

投稿2020/03/13 01:12

asm

総合スコア15147

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

mimisenn

2020/03/13 09:16

ありがとうございます!もうお一方との回答と合わせてアプリケーションエラーは解消されました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問