質問編集履歴
3
capistranoログとunicornログを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -62,7 +62,7 @@
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
|
65
|
+
~~~~~~~
|
66
66
|
|
67
67
|
|
68
68
|
|
@@ -76,27 +76,9 @@
|
|
76
76
|
|
77
77
|
Traceback (most recent call last):
|
78
78
|
|
79
|
-
12: from /home/user/sample_app/vendor/bundle/ruby/2.6.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
|
80
|
-
|
81
|
-
11: from /home/user/sample_app/vendor/bundle/ruby/2.6.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `run'
|
82
|
-
|
83
|
-
10: from /home/user/sample_app/vendor/bundle/ruby/2.6.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
|
84
|
-
|
85
|
-
9: from /mnt/c/rails_dev/rails_tutorial/sample_app/lib/capistrano/tasks/unicorn.rb:53:in `block (3 levels) in <top (required)>'
|
86
|
-
|
87
|
-
|
79
|
+
~~~~~~~
|
88
|
-
|
89
|
-
|
80
|
+
|
90
|
-
|
91
|
-
6: from /mnt/c/rails_dev/rails_tutorial/sample_app/lib/capistrano/tasks/unicorn.rb:11:in `block in start_unicorn'
|
92
|
-
|
93
|
-
5: from /home/user/sample_app/vendor/bundle/ruby/2.6.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:80:in `execute'
|
94
|
-
|
95
|
-
4: from /home/user/sample_app/vendor/bundle/ruby/2.6.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute'
|
96
|
-
|
97
|
-
3: from /home/user/sample_app/vendor/bundle/ruby/2.6.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `tap'
|
98
|
-
|
99
|
-
|
81
|
+
1.21.0/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute'
|
100
82
|
|
101
83
|
1: from /home/user/sample_app/vendor/bundle/ruby/2.6.0/gems/sshkit-1.21.0/lib/sshkit/backends/netssh.rb:170:in `execute_command'
|
102
84
|
|
@@ -162,24 +144,6 @@
|
|
162
144
|
|
163
145
|
|
164
146
|
|
165
|
-
|
166
|
-
|
167
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
INFO [caf8b853] Running $HOME/.rbenv/bin/rbenv exec bundle exec unicorn -c /var/www/sample_app/current/config/unicorn/production.rb -E production -D as user@160.*.*.*
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
DEBUG [caf8b853] Command: cd /var/www/sample_app/current && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.4" ; $HOME/.rbenv/bin/rbenv exec bundle exec unicorn -c /var/www/sample_app/current/config/unicorn/production.rb -E production -D )
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
DEBUG [caf8b853] master failed to start, check stderr log for details
|
180
|
-
|
181
|
-
|
182
|
-
|
183
147
|
```
|
184
148
|
|
185
149
|
|
@@ -222,7 +186,7 @@
|
|
222
186
|
|
223
187
|
gem 'dotenv-rails'# carrierwave.rb用に環境変数を管理するために入れたgem
|
224
188
|
|
225
|
-
|
189
|
+
~~~~~~~
|
226
190
|
|
227
191
|
|
228
192
|
|
@@ -252,7 +216,7 @@
|
|
252
216
|
|
253
217
|
|
254
218
|
|
255
|
-
|
219
|
+
~~~~~~~
|
256
220
|
|
257
221
|
|
258
222
|
|
@@ -266,7 +230,7 @@
|
|
266
230
|
|
267
231
|
|
268
232
|
|
269
|
-
|
233
|
+
~~~~~~~
|
270
234
|
|
271
235
|
|
272
236
|
|
@@ -280,6 +244,24 @@
|
|
280
244
|
|
281
245
|
|
282
246
|
|
247
|
+
#### capistrano.log(最後の3行)
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
```capistrano
|
252
|
+
|
253
|
+
INFO [ecdeef74] Running $HOME/.rbenv/bin/rbenv exec bundle exec unicorn -c /var/www/sample_app/current/config/unicorn/production.rb -E production -D as user@160.*.*.*
|
254
|
+
|
255
|
+
DEBUG [ecdeef74] Command: cd /var/www/sample_app/current && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.4" ; $HOME/.rbenv/bin/rbenv exec bundle exec unicorn -c /var/www/sample_app/current/config/unicorn/production.rb -E production -D )
|
256
|
+
|
257
|
+
DEBUG [ecdeef74] master failed to start, check stderr log for details
|
258
|
+
|
259
|
+
```
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
283
265
|
#### .carrierwave.rb
|
284
266
|
|
285
267
|
|
@@ -346,18 +328,58 @@
|
|
346
328
|
|
347
329
|
|
348
330
|
|
349
|
-
### CarrierWave::Storage::Fogが怪しい??
|
331
|
+
### unicorn.logにあるCarrierWave::Storage::Fogが怪しい??
|
350
|
-
|
351
|
-
|
352
|
-
|
332
|
+
|
333
|
+
|
334
|
+
|
353
|
-
本番環境に残っている下記
|
335
|
+
本番環境に残っている下記のunicorn.log
|
354
|
-
|
355
|
-
|
356
|
-
|
336
|
+
|
337
|
+
|
338
|
+
|
357
|
-
```
|
339
|
+
```
|
340
|
+
|
341
|
+
I, [2020-03-15T20:35:24.812163 #12624] INFO -- : Refreshing Gem list
|
342
|
+
|
343
|
+
bundler: failed to load command: unicorn (/var/www/sample_app/shared/bundle/ruby/2.6.0/bin/unicorn)
|
358
344
|
|
359
345
|
NameError: uninitialized constant CarrierWave::Storage::Fog
|
360
346
|
|
347
|
+
(eval):1:in `storage'
|
348
|
+
|
349
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/carrierwave-1.2.2/lib/carrierwave/uploader/configuration.rb:78:in `eval'
|
350
|
+
|
351
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/carrierwave-1.2.2/lib/carrierwave/uploader/configuration.rb:78:in `storage'
|
352
|
+
|
353
|
+
/var/www/sample_app/releases/20200315113501/app/uploaders/picture_uploader.rb:14:in `<class:PictureUploader>'
|
354
|
+
|
355
|
+
~~~~~~~
|
356
|
+
|
357
|
+
config.ru:4:in `require_relative'
|
358
|
+
|
359
|
+
config.ru:4:in `block in <main>'
|
360
|
+
|
361
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:125:in `instance_eval'
|
362
|
+
|
363
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/builder.rb:125:in `initialize'
|
364
|
+
|
365
|
+
config.ru:1:in `new'
|
366
|
+
|
367
|
+
config.ru:1:in `<main>'
|
368
|
+
|
369
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `eval'
|
370
|
+
|
371
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn.rb:56:in `block in builder'
|
372
|
+
|
373
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:795:in `build_app!'
|
374
|
+
|
375
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/unicorn-5.4.1/lib/unicorn/http_server.rb:139:in `start'
|
376
|
+
|
377
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/gems/unicorn-5.4.1/bin/unicorn:126:in `<top (required)>'
|
378
|
+
|
379
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
|
380
|
+
|
381
|
+
/var/www/sample_app/shared/bundle/ruby/2.6.0/bin/unicorn:23:in `<top (required)>'
|
382
|
+
|
361
383
|
```
|
362
384
|
|
363
385
|
こちらがどうも怪しいとは思っているのですが、解決方法が全くわかりません…
|
2
あ
test
CHANGED
File without changes
|
test
CHANGED
@@ -164,71 +164,7 @@
|
|
164
164
|
|
165
165
|
|
166
166
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
DEBUG [339c3eb6] Finished in 0.193 seconds with exit status 0 (successful).
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
INFO [92a1c0e8] Running $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate as user@160.*.*.*
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
DEBUG [92a1c0e8] Command: cd /var/www/sample_app/releases/20200314100710 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.4" RAILS_ENV="production" ; $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate )
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
INFO [92a1c0e8] Finished in 3.048 seconds with exit status 0 (successful).
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
INFO [805b27c3] Running /usr/bin/env ln -s /var/www/sample_app/releases/20200314100710 /var/www/sample_app/releases/current as user@160.*.*.*
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
DEBUG [805b27c3] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.4" ; /usr/bin/env ln -s /var/www/sample_app/releases/20200314100710 /var/www/sample_app/releases/current )
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
INFO [805b27c3] Finished in 0.176 seconds with exit status 0 (successful).
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
INFO [a7dadbea] Running /usr/bin/env mv /var/www/sample_app/releases/current /var/www/sample_app as user@160.*.*.*
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
DEBUG [a7dadbea] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.6.4" ; /usr/bin/env mv /var/www/sample_app/releases/current /var/www/sample_app )
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
INFO [a7dadbea] Finished in 0.190 seconds with exit status 0 (successful).
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
DEBUG [4dbe1971] Running [ -f /var/www/sample_app/current/tmp/pids/unicorn.pid ] as user@160.*.*.*
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
DEBUG [4dbe1971] Command: [ -f /var/www/sample_app/current/tmp/pids/unicorn.pid ]
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
DEBUG [4dbe1971] Finished in 0.202 seconds with exit status 1 (failed).
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
DEBUG [67807c65] Running if test ! -d /var/www/sample_app/current; then echo "Directory does not exist '/var/www/sample_app/current'" 1>&2; false; fi as user@160.*.*.*
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
DEBUG [67807c65] Command: if test ! -d /var/www/sample_app/current; then echo "Directory does not exist '/var/www/sample_app/current'" 1>&2; false; fi
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
DEBUG [67807c65] Finished in 0.202 seconds with exit status 0 (successful).
|
167
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
232
168
|
|
233
169
|
|
234
170
|
|
@@ -407,3 +343,73 @@
|
|
407
343
|
|
408
344
|
|
409
345
|
```
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
### CarrierWave::Storage::Fogが怪しい??
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
本番環境に残っている下記ログ
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
```
|
358
|
+
|
359
|
+
NameError: uninitialized constant CarrierWave::Storage::Fog
|
360
|
+
|
361
|
+
```
|
362
|
+
|
363
|
+
こちらがどうも怪しいとは思っているのですが、解決方法が全くわかりません…
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
### 試したこと
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
* 本番環境の unicorn.pid の削除
|
372
|
+
|
373
|
+
* fog や fog-aws のgem unistall(conohaのオブジェクトストレージへどうやって保存するか試行錯誤していたところでfog-aws等をinstallしていました)
|
374
|
+
|
375
|
+
* carrierwave.rbのコメントアウト等
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
ほかにも色々試行錯誤しましたが、だめでした…
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
### 補足情報(FW/ツールのバージョンなど)
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
* ubuntu(WSL) 18.04.3
|
388
|
+
|
389
|
+
* Ruby 2.6.4
|
390
|
+
|
391
|
+
* Rails 5.2.3
|
392
|
+
|
393
|
+
* capistrano 3.12.0
|
394
|
+
|
395
|
+
* unicorn 5.4.1
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
#### 本番環境
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
* さくらVPS(CentOS7)
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
どうか皆様お力添えいただけますと幸いです。
|
408
|
+
|
409
|
+
どうぞよろしくお願いいたします。
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
文字数が10000文字までしか入力できませんので、ほかのファイル情報等は追記させていただきます。
|
1
編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -403,3 +403,7 @@
|
|
403
403
|
|
404
404
|
|
405
405
|
end
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
```
|