質問編集履歴

8

age

2017/02/19 01:20

投稿

masarusan24
masarusan24

スコア55

test CHANGED
File without changes
test CHANGED
@@ -204,6 +204,4 @@
204
204
 
205
205
 
206
206
 
207
-
208
-
209
207
  問題点が特定できておらず申し訳ありませんが、アドバイスありましたらお願いします。

7

age

2017/02/19 01:20

投稿

masarusan24
masarusan24

スコア55

test CHANGED
File without changes
test CHANGED
@@ -204,4 +204,6 @@
204
204
 
205
205
 
206
206
 
207
+
208
+
207
209
  問題点が特定できておらず申し訳ありませんが、アドバイスありましたらお願いします。

6

タイトル修正

2017/02/15 07:57

投稿

masarusan24
masarusan24

スコア55

test CHANGED
@@ -1 +1 @@
1
- [Railsチュートリアル]Herokuにデプロイ後Railsアプリを開くとApplication errorが発生する
1
+ [Ruby on Rails Tutorial]Herokuにデプロイ後Railsアプリを開くとApplication error[H10 (App crashed)]が発生する
test CHANGED
File without changes

5

GitHubのURLにリンク貼り付け

2017/02/07 09:35

投稿

masarusan24
masarusan24

スコア55

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  GitHub
12
12
 
13
- https://github.com/masarusan24/sample_app
13
+ [https://github.com/masarusan24/sample_app](https://github.com/masarusan24/sample_app)
14
14
 
15
15
 
16
16
 

4

githubのURL追記

2017/02/07 05:23

投稿

masarusan24
masarusan24

スコア55

test CHANGED
File without changes
test CHANGED
@@ -2,12 +2,18 @@
2
2
 
3
3
  Cloud9(テンプレートはRails Tutorialを選択)
4
4
 
5
- ruby 2.3
5
+ Ruby 2.3
6
6
 
7
7
  Rails 5.0.0.1
8
8
 
9
9
 
10
10
 
11
+ GitHub
12
+
13
+ https://github.com/masarusan24/sample_app
14
+
15
+
16
+
11
17
  ###現象
12
18
 
13
19
  [Ruby on Rails チュートリアル](https://railstutorial.jp/)にそって学習を進めていますが、
@@ -168,7 +174,7 @@
168
174
 
169
175
 
170
176
 
171
- test_helper.rbは下記のように記述されていますが、こちらに問題があるでしょうか。
177
+ test_helper.rbは下記のように記述されていますが、こちらに問題があるでしょうか。
172
178
 
173
179
 
174
180
 
@@ -188,12 +194,8 @@
188
194
 
189
195
  class ActiveSupport::TestCase
190
196
 
191
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
192
-
193
197
  fixtures :all
194
198
 
195
- # Add more helper methods to be used by all tests here...
196
-
197
199
  include ApplicationHelper
198
200
 
199
201
  end

3

タイトル変更

2017/02/05 14:09

投稿

masarusan24
masarusan24

スコア55

test CHANGED
@@ -1 +1 @@
1
- Herokuにデプロイ後Railsアプリを開くとApplication errorが発生する
1
+ [Railsチュートリアル]Herokuにデプロイ後Railsアプリを開くとApplication errorが発生する
test CHANGED
File without changes

2

エラー画面添付

2017/01/30 01:02

投稿

masarusan24
masarusan24

スコア55

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,11 @@
18
18
 
19
19
 
20
20
 
21
+ ![エラー画面](9f983dc2094130e56d091932ea1092a1.png)
22
+
23
+
24
+
21
- ###エラーメッセージ
25
+ ####エラーメッセージ
22
26
 
23
27
  ```
24
28
 

1

1/26追記

2017/01/29 08:53

投稿

masarusan24
masarusan24

スコア55

test CHANGED
File without changes
test CHANGED
@@ -67,3 +67,135 @@
67
67
  対処方法ご教示いただけると助かります。
68
68
 
69
69
  どうぞよろしくお願いいたします。
70
+
71
+
72
+
73
+
74
+
75
+ ### 1/26 追記
76
+
77
+ 第7章に[7.5.3 本番環境へのデプロイ](https://railstutorial.jp/chapters/sign_up?version=5.0#sec-production_deployment)の項があったのでそこまで進めてみたのですが、状況変わらずでした。
78
+
79
+
80
+
81
+ 以下デプロイ手順
82
+
83
+
84
+
85
+ ```
86
+
87
+ $ rails test
88
+
89
+ $ git add -A
90
+
91
+ $ git commit -m "Use SSL and the Puma webserver in production"
92
+
93
+ $ git push
94
+
95
+ $ git push heroku
96
+
97
+ $ heroku run rails db:migrate
98
+
99
+ ```
100
+
101
+
102
+
103
+ heroku logsには相変わらず```code=H10 desc="App crashed"```が出ている状況となります。
104
+
105
+
106
+
107
+ heroku logs 詳細
108
+
109
+
110
+
111
+ ```
112
+
113
+ 2017-01-26T06:53:49.671886+00:00 heroku[web.1]: Process exited with status 1
114
+
115
+ 2017-01-26T06:53:49.689491+00:00 heroku[web.1]: State changed from starting to crashed
116
+
117
+ 2017-01-26T06:53:49.690754+00:00 heroku[web.1]: State changed from crashed to starting
118
+
119
+ 2017-01-26T06:53:52.311557+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
120
+
121
+ 2017-01-26T06:53:54.862499+00:00 app[web.1]: Puma starting in single mode...
122
+
123
+ 2017-01-26T06:53:54.862561+00:00 app[web.1]: * Version 3.4.0 (ruby 2.2.6-p396), codename: Owl Bowl Brawl
124
+
125
+ 2017-01-26T06:53:54.862565+00:00 app[web.1]: * Min threads: 5, max threads: 5
126
+
127
+ 2017-01-26T06:53:54.862586+00:00 app[web.1]: * Environment: production
128
+
129
+ 2017-01-26T06:53:56.445348+00:00 app[web.1]: ! Unable to load application: LoadError: No such file to load -- test_helper
130
+
131
+ 2017-01-26T06:53:56.445431+00:00 app[web.1]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.2.0/bin/puma)
132
+
133
+ 2017-01-26T06:53:56.445473+00:00 app[web.1]: LoadError: No such file to load -- test_helper
134
+
135
+ 2017-01-26T06:53:56.445477+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
136
+
137
+ 2017-01-26T06:53:56.445478+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
138
+
139
+ ・・・
140
+
141
+ 2017-01-26T06:54:04.803456+00:00 heroku[run.2360]: Starting process with command `rails db:migrate`
142
+
143
+ 2017-01-26T06:54:12.716942+00:00 heroku[run.2360]: State changed from up to complete
144
+
145
+ 2017-01-26T06:54:12.696494+00:00 heroku[run.2360]: Process exited with status 0
146
+
147
+ 2017-01-26T06:54:55.533586+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calm-garden-72176.herokuapp.com request_id=9c05bdaa-3019-4ad9-9afd-41d490c4e340 fwd="219.101.173.94" dyno= connect= service= status=503 bytes=
148
+
149
+ 2017-01-26T06:54:56.293246+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calm-garden-72176.herokuapp.com request_id=cb47c74e-37b0-4936-9070-0c8d29c8d715 fwd="219.101.173.94" dyno= connect= service= status=503 bytes=
150
+
151
+ ```
152
+
153
+
154
+
155
+ 以下の行あたりが怪しいでしょうか。。
156
+
157
+ test_helperが見つからない?
158
+
159
+ ```
160
+
161
+ ! Unable to load application: LoadError: No such file to load -- test_helper
162
+
163
+ ```
164
+
165
+
166
+
167
+ test_helper.rbは下記のように記述されていますが、こちらに問題があるのでしょうか。
168
+
169
+
170
+
171
+ ```ruby
172
+
173
+ ENV['RAILS_ENV'] ||= 'test'
174
+
175
+ require File.expand_path('../../config/environment', __FILE__)
176
+
177
+ require 'rails/test_help'
178
+
179
+ require "minitest/reporters"
180
+
181
+ Minitest::Reporters.use!
182
+
183
+
184
+
185
+ class ActiveSupport::TestCase
186
+
187
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
188
+
189
+ fixtures :all
190
+
191
+ # Add more helper methods to be used by all tests here...
192
+
193
+ include ApplicationHelper
194
+
195
+ end
196
+
197
+ ```
198
+
199
+
200
+
201
+ 問題点が特定できておらず申し訳ありませんが、アドバイスありましたらお願いします。