質問編集履歴
3
タイトル変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
herokuにデプロイできません
|
1
|
+
herokuにデプロイできません(NoMethodError)
|
test
CHANGED
@@ -38,8 +38,6 @@
|
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
-
|
42
|
-
|
43
41
|
お手数おかけしますが、何卒よろしくお願いいたします。
|
44
42
|
|
45
43
|
|
2
改善するうちに、コード、エラー内容が変わったため
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
herokuにデプロイできません
|
test
CHANGED
@@ -1,12 +1,4 @@
|
|
1
|
-
閲覧ありがとうございます!
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
色々と調べてたのですが、解決できなかったので質問させてください。
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
herokuにデプロイできず詰まっています。
|
10
2
|
|
11
3
|
|
12
4
|
|
@@ -14,10 +6,6 @@
|
|
14
6
|
|
15
7
|
|
16
8
|
|
17
|
-
何卒、よろしくお願いいたします!!!
|
18
|
-
|
19
|
-
|
20
|
-
|
21
9
|
現状は下記の通りです。
|
22
10
|
|
23
11
|
|
@@ -32,12 +20,6 @@
|
|
32
20
|
|
33
21
|
|
34
22
|
|
35
|
-
■原因だと考えていること
|
36
|
-
|
37
|
-
・heroku logsにて確認したところ、ビルドが失敗しております。
|
38
|
-
|
39
|
-
・エラーメッセージにてすでにデプロイ済みですと警告が出ています。
|
40
|
-
|
41
23
|
|
42
24
|
|
43
25
|
■試したこと
|
@@ -66,17 +48,17 @@
|
|
66
48
|
|
67
49
|
```
|
68
50
|
|
69
|
-
Enumerating objects: 9
|
51
|
+
Enumerating objects: 9414, done.
|
70
|
-
|
52
|
+
|
71
|
-
Counting objects: 100% (9
|
53
|
+
Counting objects: 100% (9414/9414), done.
|
72
54
|
|
73
55
|
Delta compression using up to 8 threads
|
74
56
|
|
75
|
-
Compressing objects: 100% (
|
57
|
+
Compressing objects: 100% (8045/8045), done.
|
76
|
-
|
58
|
+
|
77
|
-
Writing objects: 100% (9
|
59
|
+
Writing objects: 100% (9414/9414), 31.47 MiB | 567.00 KiB/s, done.
|
78
|
-
|
60
|
+
|
79
|
-
Total 9
|
61
|
+
Total 9414 (delta 2551), reused 6930 (delta 849), pack-reused 0
|
80
62
|
|
81
63
|
remote: Compressing source files... done.
|
82
64
|
|
@@ -84,9 +66,131 @@
|
|
84
66
|
|
85
67
|
remote:
|
86
68
|
|
69
|
+
remote: -----> Node.js app detected
|
70
|
+
|
71
|
+
remote:
|
72
|
+
|
73
|
+
remote: -----> Creating runtime environment
|
74
|
+
|
75
|
+
remote:
|
76
|
+
|
77
|
+
remote: NPM_CONFIG_LOGLEVEL=error
|
78
|
+
|
79
|
+
remote: USE_YARN_CACHE=true
|
80
|
+
|
81
|
+
remote: NODE_ENV=production
|
82
|
+
|
83
|
+
remote: NODE_MODULES_CACHE=true
|
84
|
+
|
85
|
+
remote: NODE_VERBOSE=false
|
86
|
+
|
87
|
+
remote:
|
88
|
+
|
89
|
+
remote: -----> Installing binaries
|
90
|
+
|
91
|
+
remote: engines.node (package.json): unspecified
|
92
|
+
|
93
|
+
remote: engines.npm (package.json): unspecified (use default)
|
94
|
+
|
95
|
+
remote: engines.yarn (package.json): unspecified (use default)
|
96
|
+
|
97
|
+
remote:
|
98
|
+
|
99
|
+
remote: Resolving node version 12.x...
|
100
|
+
|
101
|
+
remote: Downloading and installing node 12.20.0...
|
102
|
+
|
103
|
+
remote: Using default npm version: 6.14.8
|
104
|
+
|
105
|
+
remote: Resolving yarn version 1.22.x...
|
106
|
+
|
107
|
+
remote: Downloading and installing yarn (1.22.10)
|
108
|
+
|
109
|
+
remote: Installed yarn 1.22.10
|
110
|
+
|
111
|
+
remote:
|
112
|
+
|
113
|
+
remote: -----> Installing dependencies
|
114
|
+
|
115
|
+
remote: Installing node modules (yarn.lock)
|
116
|
+
|
117
|
+
remote: yarn install v1.22.10
|
118
|
+
|
119
|
+
remote: [1/4] Resolving packages...
|
120
|
+
|
121
|
+
remote: [2/4] Fetching packages...
|
122
|
+
|
123
|
+
remote: info fsevents@2.1.3: The platform "linux" is incompatible with this module.
|
124
|
+
|
125
|
+
remote: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
|
126
|
+
|
127
|
+
remote: info fsevents@1.2.13: The platform "linux" is incompatible with this module.
|
128
|
+
|
129
|
+
remote: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
|
130
|
+
|
131
|
+
remote: [3/4] Linking dependencies...
|
132
|
+
|
133
|
+
remote: warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
|
134
|
+
|
135
|
+
remote: warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
|
136
|
+
|
137
|
+
remote: [4/4] Building fresh packages...
|
138
|
+
|
139
|
+
remote: Done in 34.94s.
|
140
|
+
|
141
|
+
remote:
|
142
|
+
|
143
|
+
remote: -----> Build
|
144
|
+
|
145
|
+
remote:
|
146
|
+
|
147
|
+
remote: -----> Pruning devDependencies
|
148
|
+
|
149
|
+
remote: yarn install v1.22.10
|
150
|
+
|
151
|
+
remote: [1/4] Resolving packages...
|
152
|
+
|
153
|
+
remote: [2/4] Fetching packages...
|
154
|
+
|
155
|
+
remote: info fsevents@2.1.3: The platform "linux" is incompatible with this module.
|
156
|
+
|
157
|
+
remote: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
|
158
|
+
|
159
|
+
remote: info fsevents@1.2.13: The platform "linux" is incompatible with this module.
|
160
|
+
|
161
|
+
remote: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
|
162
|
+
|
163
|
+
remote: [3/4] Linking dependencies...
|
164
|
+
|
165
|
+
remote: warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
|
166
|
+
|
167
|
+
remote: warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
|
168
|
+
|
169
|
+
remote: [4/4] Building fresh packages...
|
170
|
+
|
171
|
+
remote: warning Ignored scripts due to flag.
|
172
|
+
|
173
|
+
remote: Done in 6.71s.
|
174
|
+
|
175
|
+
remote:
|
176
|
+
|
177
|
+
remote: -----> Caching build
|
178
|
+
|
179
|
+
remote: - yarn cache
|
180
|
+
|
181
|
+
remote:
|
182
|
+
|
183
|
+
remote: -----> Build succeeded!
|
184
|
+
|
185
|
+
remote: ! Unmet dependencies don't fail yarn install but may cause runtime issues
|
186
|
+
|
187
|
+
remote: https://github.com/npm/npm/issues/7494
|
188
|
+
|
189
|
+
remote:
|
190
|
+
|
87
191
|
remote: -----> Ruby app detected
|
88
192
|
|
89
|
-
remote: -----> Installing bundler
|
193
|
+
remote: -----> Installing bundler 2.1.4
|
90
194
|
|
91
195
|
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
|
92
196
|
|
@@ -94,33 +198,41 @@
|
|
94
198
|
|
95
199
|
remote: -----> Using Ruby version: ruby-2.6.6
|
96
200
|
|
97
|
-
remote: -----> Installing dependencies using bundler
|
201
|
+
remote: -----> Installing dependencies using bundler 2.1.4
|
98
|
-
|
202
|
+
|
99
|
-
remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1
|
203
|
+
remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
|
204
|
+
|
100
|
-
|
205
|
+
remote: /tmp/build_7d30a02c/bin/bundle:34:in `gemfile': undefined method `present?' for "/tmp/build_7d30a02c/Gemfile":String (NoMethodError)
|
206
|
+
|
207
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:41:in `lockfile'
|
208
|
+
|
209
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:49:in `lockfile_version'
|
210
|
+
|
211
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:58:in `bundler_version'
|
212
|
+
|
101
|
-
remote: /tmp/build_0
|
213
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:62:in `bundler_requirement'
|
214
|
+
|
102
|
-
|
215
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:89:in `activate_bundler'
|
216
|
+
|
103
|
-
remote: /tmp/build_0
|
217
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:78:in `load_bundler!'
|
218
|
+
|
104
|
-
|
219
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:102:in `<main>'
|
220
|
+
|
221
|
+
remote: Bundler Output: /tmp/build_7d30a02c/bin/bundle:34:in `gemfile': undefined method `present?' for "/tmp/build_7d30a02c/Gemfile":String (NoMethodError)
|
222
|
+
|
223
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:41:in `lockfile'
|
224
|
+
|
105
|
-
remote: /tmp/build_0
|
225
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:49:in `lockfile_version'
|
226
|
+
|
106
|
-
|
227
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:58:in `bundler_version'
|
228
|
+
|
107
|
-
remote: /tmp/build_0
|
229
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:62:in `bundler_requirement'
|
108
|
-
|
109
|
-
|
230
|
+
|
110
|
-
|
111
|
-
remote: /tmp/build_095af776/bin/bundle: line 7: ` File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)'
|
112
|
-
|
113
|
-
remote:
|
231
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:89:in `activate_bundler'
|
114
|
-
|
232
|
+
|
115
|
-
remote: /tmp/build_0
|
233
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:78:in `load_bundler!'
|
116
|
-
|
117
|
-
|
234
|
+
|
118
|
-
|
119
|
-
remote: /tmp/build_0
|
235
|
+
remote: from /tmp/build_7d30a02c/bin/bundle:102:in `<main>'
|
120
|
-
|
121
|
-
remote: /tmp/build_095af776/bin/bundle: line 7: syntax error near unexpected token `$PROGRAM_NAME'
|
122
|
-
|
123
|
-
remote: /tmp/build_095af776/bin/bundle: line 7: ` File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)'
|
124
236
|
|
125
237
|
remote:
|
126
238
|
|
@@ -136,32 +248,6 @@
|
|
136
248
|
|
137
249
|
remote: ! Push failed
|
138
250
|
|
139
|
-
remote: !
|
140
|
-
|
141
|
-
remote: ! ## Warning - The same version of this code has already been built: 24fab7dc0a9f00ebc1df6c2d6ffffb80f441baf0
|
142
|
-
|
143
|
-
remote: !
|
144
|
-
|
145
|
-
remote: ! We have detected that you have triggered a build from source code with version 24fab7dc0a9f00ebc1df6c2d6ffffb80f441baf0
|
146
|
-
|
147
|
-
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
|
148
|
-
|
149
|
-
remote: !
|
150
|
-
|
151
|
-
remote: ! If you are developing on a branch and deploying via git you must run:
|
152
|
-
|
153
|
-
remote: !
|
154
|
-
|
155
|
-
remote: ! git push heroku <branchname>:main
|
156
|
-
|
157
|
-
remote: !
|
158
|
-
|
159
|
-
remote: ! This article goes into details on the behavior:
|
160
|
-
|
161
|
-
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
|
162
|
-
|
163
|
-
remote:
|
164
|
-
|
165
251
|
remote: Verifying deploy...
|
166
252
|
|
167
253
|
remote:
|
@@ -172,7 +258,7 @@
|
|
172
258
|
|
173
259
|
To https://git.heroku.com/music-sns-app.git
|
174
260
|
|
175
|
-
! [remote rejected]
|
261
|
+
! [remote rejected] heroku_deploy_error -> main (pre-receive hook declined)
|
176
262
|
|
177
263
|
error: failed to push some refs to 'https://git.heroku.com/music-sns-app.git'
|
178
264
|
|
@@ -184,7 +270,7 @@
|
|
184
270
|
|
185
271
|
```
|
186
272
|
|
187
|
-
|
273
|
+
Build failed -- check your build output:URL
|
188
274
|
|
189
275
|
```
|
190
276
|
|
1
エラーの内容が変わった為
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
すでにデプロイ済みと言われてpushできません。
|
test
CHANGED
@@ -4,7 +4,17 @@
|
|
4
4
|
|
5
5
|
色々と調べてたのですが、解決できなかったので質問させてください。
|
6
6
|
|
7
|
+
|
8
|
+
|
7
|
-
現在、Railsにてオリジナルアプリを開発中なのですがherokuにデプロイできず詰まって
|
9
|
+
現在、実務未経験で転職活動のため、Railsにてオリジナルアプリを開発中なのですがherokuにデプロイできず詰まっています...
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
自分で色々と調べ、試したのですが解決せずどの様に解決したらいいのか分かりません...
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
何卒、よろしくお願いいたします!!!
|
8
18
|
|
9
19
|
|
10
20
|
|
@@ -26,7 +36,7 @@
|
|
26
36
|
|
27
37
|
・heroku logsにて確認したところ、ビルドが失敗しております。
|
28
38
|
|
29
|
-
・エラーメッセージにて
|
39
|
+
・エラーメッセージにてすでにデプロイ済みですと警告が出ています。
|
30
40
|
|
31
41
|
|
32
42
|
|
@@ -34,9 +44,15 @@
|
|
34
44
|
|
35
45
|
・コミットしていることを確認。
|
36
46
|
|
37
|
-
・
|
47
|
+
・herokuアプリを削除し、再度作り直しました。
|
38
|
-
|
48
|
+
|
39
|
-
・
|
49
|
+
・エラーメッセージにあるgit push heroku ブランチ名:mainコマンドを実行。
|
50
|
+
|
51
|
+
→git push heroku master:main
|
52
|
+
|
53
|
+
→git push heroku develop:main
|
54
|
+
|
55
|
+
どちらも同じエラーが出てデプロイできませんでした...
|
40
56
|
|
41
57
|
|
42
58
|
|
@@ -46,23 +62,21 @@
|
|
46
62
|
|
47
63
|
|
48
64
|
|
49
|
-
|
50
|
-
|
51
65
|
■エラーメッセージ(git push heroku master後)
|
52
66
|
|
53
67
|
```
|
54
68
|
|
55
|
-
Enumerating objects:
|
69
|
+
Enumerating objects: 9049, done.
|
56
|
-
|
70
|
+
|
57
|
-
Counting objects: 100% (
|
71
|
+
Counting objects: 100% (9049/9049), done.
|
58
72
|
|
59
73
|
Delta compression using up to 8 threads
|
60
74
|
|
61
|
-
Compressing objects: 100% (7
|
75
|
+
Compressing objects: 100% (7687/7687), done.
|
62
|
-
|
76
|
+
|
63
|
-
Writing objects: 100% (
|
77
|
+
Writing objects: 100% (9049/9049), 31.44 MiB | 211.00 KiB/s, done.
|
64
|
-
|
78
|
+
|
65
|
-
Total
|
79
|
+
Total 9049 (delta 2278), reused 6930 (delta 849), pack-reused 0
|
66
80
|
|
67
81
|
remote: Compressing source files... done.
|
68
82
|
|
@@ -84,29 +98,29 @@
|
|
84
98
|
|
85
99
|
remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE=1 bundle install -j4
|
86
100
|
|
87
|
-
remote: /tmp/build_
|
101
|
+
remote: /tmp/build_095af776/bin/bundle: line 1: require: command not found
|
88
|
-
|
102
|
+
|
89
|
-
remote: /tmp/build_
|
103
|
+
remote: /tmp/build_095af776/bin/bundle: line 3: m: command not found
|
90
|
-
|
104
|
+
|
91
|
-
remote: /tmp/build_
|
105
|
+
remote: /tmp/build_095af776/bin/bundle: line 4: module_function: command not found
|
92
|
-
|
106
|
+
|
93
|
-
remote: /tmp/build_
|
107
|
+
remote: /tmp/build_095af776/bin/bundle: line 6: def: command not found
|
94
|
-
|
108
|
+
|
95
|
-
remote: /tmp/build_
|
109
|
+
remote: /tmp/build_095af776/bin/bundle: line 7: syntax error near unexpected token `$PROGRAM_NAME'
|
96
|
-
|
110
|
+
|
97
|
-
remote: /tmp/build_
|
111
|
+
remote: /tmp/build_095af776/bin/bundle: line 7: ` File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)'
|
98
|
-
|
112
|
+
|
99
|
-
remote: Bundler Output: /tmp/build_
|
113
|
+
remote: Bundler Output: /tmp/build_095af776/bin/bundle: line 1: require: command not found
|
100
|
-
|
114
|
+
|
101
|
-
remote: /tmp/build_
|
115
|
+
remote: /tmp/build_095af776/bin/bundle: line 3: m: command not found
|
102
|
-
|
116
|
+
|
103
|
-
remote: /tmp/build_
|
117
|
+
remote: /tmp/build_095af776/bin/bundle: line 4: module_function: command not found
|
104
|
-
|
118
|
+
|
105
|
-
remote: /tmp/build_
|
119
|
+
remote: /tmp/build_095af776/bin/bundle: line 6: def: command not found
|
106
|
-
|
120
|
+
|
107
|
-
remote: /tmp/build_
|
121
|
+
remote: /tmp/build_095af776/bin/bundle: line 7: syntax error near unexpected token `$PROGRAM_NAME'
|
108
|
-
|
122
|
+
|
109
|
-
remote: /tmp/build_
|
123
|
+
remote: /tmp/build_095af776/bin/bundle: line 7: ` File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)'
|
110
124
|
|
111
125
|
remote:
|
112
126
|
|
@@ -122,6 +136,32 @@
|
|
122
136
|
|
123
137
|
remote: ! Push failed
|
124
138
|
|
139
|
+
remote: !
|
140
|
+
|
141
|
+
remote: ! ## Warning - The same version of this code has already been built: 24fab7dc0a9f00ebc1df6c2d6ffffb80f441baf0
|
142
|
+
|
143
|
+
remote: !
|
144
|
+
|
145
|
+
remote: ! We have detected that you have triggered a build from source code with version 24fab7dc0a9f00ebc1df6c2d6ffffb80f441baf0
|
146
|
+
|
147
|
+
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
|
148
|
+
|
149
|
+
remote: !
|
150
|
+
|
151
|
+
remote: ! If you are developing on a branch and deploying via git you must run:
|
152
|
+
|
153
|
+
remote: !
|
154
|
+
|
155
|
+
remote: ! git push heroku <branchname>:main
|
156
|
+
|
157
|
+
remote: !
|
158
|
+
|
159
|
+
remote: ! This article goes into details on the behavior:
|
160
|
+
|
161
|
+
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
|
162
|
+
|
163
|
+
remote:
|
164
|
+
|
125
165
|
remote: Verifying deploy...
|
126
166
|
|
127
167
|
remote:
|
@@ -132,7 +172,7 @@
|
|
132
172
|
|
133
173
|
To https://git.heroku.com/music-sns-app.git
|
134
174
|
|
135
|
-
! [remote rejected] master -> ma
|
175
|
+
! [remote rejected] master -> main (pre-receive hook declined)
|
136
176
|
|
137
177
|
error: failed to push some refs to 'https://git.heroku.com/music-sns-app.git'
|
138
178
|
|