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

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

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

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

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

Q&A

解決済

1回答

1306閲覧

Herokuにデプロイ時に発生したApplicationError(H10)を解消したい

taka2477

総合スコア8

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

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

0グッド

0クリップ

投稿2018/08/20 21:01

編集2018/08/20 21:12

前提・実現したいこと

現在Railsチュートリアル5章をやっており、最後にherokuへpushしブラウザからアプリを起動すると、ApplicationError(code=H10)が発生してしまいます。これを解決させて先へ進みたいです。
いろいろ自分なりに試しましたが原因がわからずお手上げ状態です。どなたかご教授いただけると幸いです。よろしくお願いいたします。

###該当すると思うコード

5.1.4/lib/active_support/dependencies.rb:292:in `require': No such file to load -- test_helper.rb (LoadError)

いろいろ自分なりに試してみましたが、このファイルのどこを直せばいいのかわかりません。

###heroku logsの結果

2018-08-20T11:35:41.951022+00:00 app[web.1]: from config.ru:in `<main>' 2018-08-20T11:35:41.951031+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in `parse_file' 2018-08-20T11:35:41.951037+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:219:in `app' 2018-08-20T11:35:41.951044+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:354:in `wrapped_app' 2018-08-20T11:35:41.951048+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:283:in `start' 2018-08-20T11:35:41.951050+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:44:in `start' 2018-08-20T11:35:41.951053+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:135:in `block in perform' 2018-08-20T11:35:41.951058+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap' 2018-08-20T11:35:41.951059+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform' 2018-08-20T11:35:41.951064+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' 2018-08-20T11:35:41.951067+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' 2018-08-20T11:35:41.951069+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' 2018-08-20T11:35:41.951073+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform' 2018-08-20T11:35:41.951077+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke' 2018-08-20T11:35:41.951079+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>' 2018-08-20T11:35:41.951083+00:00 app[web.1]: from bin/rails:9:in `require' 2018-08-20T11:35:41.951085+00:00 app[web.1]: from bin/rails:9:in `<main>' 2018-08-20T11:35:41.956753+00:00 app[web.1]: => Booting Puma 2018-08-20T11:35:41.956757+00:00 app[web.1]: => Rails 5.1.4 application starting in production 2018-08-20T11:35:41.956759+00:00 app[web.1]: => Run `rails server -h` for more startup options 2018-08-20T11:35:41.956760+00:00 app[web.1]: Exiting 2018-08-20T11:35:44.681776+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 43129 -e production` 2018-08-20T11:35:49.638694+00:00 heroku[web.1]: State changed from starting to crashed 2018-08-20T11:35:49.564122+00:00 app[web.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': No such file to load -- test_helper.rb (LoadError) 2018-08-20T11:35:49.564145+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require' 2018-08-20T11:35:49.564147+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency' 2018-08-20T11:35:49.564149+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require' 2018-08-20T11:35:49.564151+00:00 app[web.1]: from /app/app/helpers/application_helper_test.rb:1:in `<top (required)>' 2018-08-20T11:35:49.564152+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require' 2018-08-20T11:35:49.564154+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require' 2018-08-20T11:35:49.564155+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency' 2018-08-20T11:35:49.564157+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require' 2018-08-20T11:35:49.564163+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:379:in `block in require_or_load' (中略) 2018-08-20T18:59:29.848898+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>' 2018-08-20T18:59:29.848895+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke' 2018-08-20T18:59:29.848900+00:00 app[web.1]: from bin/rails:9:in `require' 2018-08-20T18:59:29.848903+00:00 app[web.1]: from bin/rails:9:in `<main>' 2018-08-20T18:59:29.852126+00:00 app[web.1]: => Booting Puma 2018-08-20T18:59:29.852130+00:00 app[web.1]: => Rails 5.1.4 application starting in production 2018-08-20T18:59:29.852131+00:00 app[web.1]: => Run `rails server -h` for more startup options 2018-08-20T18:59:29.852133+00:00 app[web.1]: Exiting 2018-08-20T18:59:30.045802+00:00 heroku[web.1]: State changed from starting to crashed 2018-08-20T20:36:24.016944+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=arcane-cliffs-37450.herokuapp.com request_id=775ee241-d1fd-42fa-8e90-4b7da5f7353f fwd="14.132.57.10" dyno= connect= service= status=503 bytes= protocol=https 2018-08-20T20:36:25.329826+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=arcane-cliffs-37450.herokuapp.com request_id=435660c1-b34b-4745-bd62-eb09fe836180 fwd="14.132.57.10" dyno= connect= service= status=503 bytes= protocol=https 2018-08-20T20:45:51.429291+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=arcane-cliffs-37450.herokuapp.com request_id=5b796605-caa1-4646-a04b-91c93d4510e8 fwd="14.132.57.10" dyno= connect= service= status=503 bytes= protocol=https 2018-08-20T20:45:52.739821+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=arcane-cliffs-37450.herokuapp.com request_id=773ddbad-d023-4160-84cd-4f734f6b9c12 fwd="14.132.57.10" dyno= connect= service= status=503 bytes= protocol=https
Rails 5.1.4

試したこと

heroku run console

(結果)Running console on ⬢ アプリ名... up, run.3309 (Free)
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': No such file to load -- test_helper.rb (LoadError)

Herokuアプリの再起動

heroku restart

Heroku アプリの停止

heroku ps:scale web=0

Heroku アプリの起動

heroku ps:scale web=1

Railsチュートリアル5章に従って最初からやり直し

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

AWS クラウド9

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

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

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

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

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

guest

回答1

0

自己解決

自己解決しました。
application_helper_test.rbがapp/assets/helpersに入っていたため、それをtest/helpersに移動させて再度コミット、プッシュしたら解決できました!お騒がせいたしました。

投稿2018/08/20 22:36

taka2477

総合スコア8

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問