質問編集履歴

3

[Unicornの古いプロセスが消えません](https://teratail.com/questions/108803?link=qa_related_pc_sidebar)

2019/11/29 10:25

投稿

Eiji_
Eiji_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -437,3 +437,7 @@
437
437
  ①サーバー側にインターネットからアクセスすると403エラーになります。
438
438
 
439
439
  ②また、`bundle exec cap production deploy`をunicornをkillせずにやると追記1と同じエラーが出ます。
440
+
441
+ [Unicornの古いプロセスが消えません](https://teratail.com/questions/108803?link=qa_related_pc_sidebar)
442
+
443
+ 今はこれが気になります。

2

unicorn側とnginx側のsockのズレ

2019/11/29 10:25

投稿

Eiji_
Eiji_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -142,7 +142,7 @@
142
142
 
143
143
 
144
144
 
145
- ##追記
145
+ ##追記
146
146
 
147
147
  ```
148
148
 
@@ -427,3 +427,13 @@
427
427
  [AWSはこれで大丈夫](https://qiita.com/Yama-to/items/1e1d889e6d5f7cc7f281)
428
428
 
429
429
  だとステージングにGemを追加してます。どうゆうことなんでしょうか
430
+
431
+
432
+
433
+ ##追記2
434
+
435
+ unicorn側とnginx側のsockが違っていて治して、更にサーバー側からunicornをkillしたら、最後まで'bundle exec cap production deploy`が最後までできましたが。
436
+
437
+ ①サーバー側にインターネットからアクセスすると403エラーになります。
438
+
439
+ ②また、`bundle exec cap production deploy`をunicornをkillせずにやると追記1と同じエラーが出ます。

1

The following gems are missingについて

2019/11/29 10:22

投稿

Eiji_
Eiji_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -139,3 +139,291 @@
139
139
  ```
140
140
 
141
141
  検索して上記の書き方が違うのかと思いましたが、全くわかりません。
142
+
143
+
144
+
145
+ ##追記
146
+
147
+ ```
148
+
149
+ capistrano.log
150
+
151
+
152
+
153
+ DEBUG [a8c23ee2] Command: cd /var/www/Oekaki_app/releases/20191129055110 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.1" ; $HOME/.rbenv/bin/rbenv exec bundle check --path /var/www/Oekaki_app/shared/bundle )
154
+
155
+ DEBUG [a8c23ee2] The following gems are missing
156
+
157
+ DEBUG [a8c23ee2] * net-ssh (5.2.0)
158
+
159
+ DEBUG [a8c23ee2] * net-scp (2.0.0)
160
+
161
+ DEBUG [a8c23ee2] * sshkit (1.20.0)
162
+
163
+ DEBUG [a8c23ee2] * airbrussh (1.4.0)
164
+
165
+ DEBUG [a8c23ee2] * bindex (0.8.1)
166
+
167
+ DEBUG [a8c23ee2] * byebug (11.0.1)
168
+
169
+ DEBUG [a8c23ee2] * capistrano (3.11.2)
170
+
171
+ DEBUG [a8c23ee2] * capistrano-bundler (1.6.0)
172
+
173
+ DEBUG [a8c23ee2] * capistrano-rails (1.4.0)
174
+
175
+ DEBUG [a8c23ee2] * capistrano-rbenv (2.1.4)
176
+
177
+ DEBUG [a8c23ee2] * regexp_parser (1.6.0)
178
+
179
+ DEBUG [a8c23ee2] * xpath (3.2.0)
180
+
181
+ DEBUG [a8c23ee2] * capybara (3.29.0)
182
+
183
+ DEBUG [a8c23ee2] * childprocess (2.0.0)
184
+
185
+ DEBUG [a8c23ee2] * diff-lcs (1.3)
186
+
187
+ DEBUG [a8c23ee2] * dotenv (2.7.5)
188
+
189
+ DEBUG [a8c23ee2] * dotenv-rails (2.7.5)
190
+
191
+ DEBUG [a8c23ee2] * factory_bot (5.1.0)
192
+
193
+ DEBUG [a8c23ee2] * factory_bot_rails (5.1.0)
194
+
195
+ DEBUG [a8c23ee2] * hirb (0.7.3)
196
+
197
+ DEBUG [a8c23ee2] * unicode-display_width (0.1.1)
198
+
199
+ DEBUG [a8c23ee2] * hirb-unicode (0.0.5)
200
+
201
+ DEBUG [a8c23ee2] * ruby_dep (1.5.0)
202
+
203
+ DEBUG [a8c23ee2] * listen (3.1.5)
204
+
205
+ DEBUG [a8c23ee2] * rspec-support (3.8.2)
206
+
207
+ DEBUG [a8c23ee2] * rspec-core (3.8.2)
208
+
209
+ DEBUG [a8c23ee2] * rspec-expectations (3.8.4)
210
+
211
+ DEBUG [a8c23ee2] * rspec-mocks (3.8.1)
212
+
213
+ DEBUG [a8c23ee2] * rspec-rails (3.8.2)
214
+
215
+ DEBUG [a8c23ee2] * rubyzip (1.3.0)
216
+
217
+ DEBUG [a8c23ee2] * selenium-webdriver (3.142.4)
218
+
219
+ DEBUG [a8c23ee2] * spring (2.1.0)
220
+
221
+ DEBUG [a8c23ee2] * spring-watcher-listen (2.0.1)
222
+
223
+ DEBUG [a8c23ee2] * web-console (3.7.0)
224
+
225
+ DEBUG [a8c23ee2] * webdrivers (4.1.2)
226
+
227
+ DEBUG [a8c23ee2] Install missing gems with `bundle install`
228
+
229
+ ```
230
+
231
+
232
+
233
+ ```
234
+
235
+ Gemfile
236
+
237
+
238
+
239
+ source 'https://rubygems.org'
240
+
241
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
242
+
243
+
244
+
245
+ ruby '2.5.1'
246
+
247
+
248
+
249
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
250
+
251
+ gem 'rails', '~> 5.2.3'
252
+
253
+ # Use postgresql as the database for Active Record
254
+
255
+ gem 'pg', '>= 0.18', '< 2.0'
256
+
257
+ # Use Puma as the app server
258
+
259
+ gem 'puma', '~> 3.11'
260
+
261
+ # Use SCSS for stylesheets
262
+
263
+ gem 'sass-rails', '~> 5.0'
264
+
265
+ # Use Uglifier as compressor for JavaScript assets
266
+
267
+ gem 'uglifier', '>= 1.3.0'
268
+
269
+ # See https://github.com/rails/execjs#readme for more supported runtimes
270
+
271
+ # gem 'mini_racer', platforms: :ruby
272
+
273
+
274
+
275
+ # Use CoffeeScript for .coffee assets and views
276
+
277
+ gem 'coffee-rails', '~> 4.2'
278
+
279
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
280
+
281
+ gem 'turbolinks', '~> 5'
282
+
283
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
284
+
285
+ gem 'jbuilder', '~> 2.5'
286
+
287
+ # Use Redis adapter to run Action Cable in production
288
+
289
+ # gem 'redis', '~> 4.0'
290
+
291
+ # Use ActiveModel has_secure_password
292
+
293
+ # gem 'bcrypt', '~> 3.1.7'
294
+
295
+
296
+
297
+ # Use ActiveStorage variant
298
+
299
+ # gem 'mini_magick', '~> 4.8'
300
+
301
+
302
+
303
+ # Use Capistrano for deployment
304
+
305
+ # gem 'capistrano-rails', group: :development
306
+
307
+
308
+
309
+ # Reduces boot times through caching; required in config/boot.rb
310
+
311
+ gem 'bootsnap', '>= 1.1.0', require: false
312
+
313
+
314
+
315
+ group :development, :test do
316
+
317
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
318
+
319
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
320
+
321
+ gem 'rspec-rails'
322
+
323
+ gem 'factory_bot_rails'
324
+
325
+ gem 'hirb'
326
+
327
+ gem 'hirb-unicode'
328
+
329
+ gem 'dotenv-rails'
330
+
331
+ gem 'capistrano'
332
+
333
+ gem 'capistrano-bundler'
334
+
335
+ gem 'capistrano-rails'
336
+
337
+ gem 'capistrano-rbenv'
338
+
339
+ end
340
+
341
+ group :production, :staging do
342
+
343
+ gem 'unicorn'
344
+
345
+ end
346
+
347
+
348
+
349
+ group :development do
350
+
351
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
352
+
353
+ gem 'web-console', '>= 3.3.0'
354
+
355
+ gem 'listen', '>= 3.0.5', '< 3.2'
356
+
357
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
358
+
359
+ gem 'spring'
360
+
361
+ gem 'spring-watcher-listen', '~> 2.0.0'
362
+
363
+ end
364
+
365
+
366
+
367
+ group :test do
368
+
369
+ # Adds support for Capybara system testing and selenium driver
370
+
371
+ gem 'capybara', '>= 2.15'
372
+
373
+ # Easy installation and use of chromedriver to run system tests with Chrome
374
+
375
+ # gem 'chromedriver-helper'
376
+
377
+ gem 'webdrivers'
378
+
379
+ gem 'selenium-webdriver'
380
+
381
+ end
382
+
383
+
384
+
385
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
386
+
387
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
388
+
389
+ gem 'slim-rails'
390
+
391
+ gem 'html2slim'
392
+
393
+ gem "bootstrap", "~> 4.3.1"
394
+
395
+ gem 'jquery-rails'
396
+
397
+ gem 'shrine'
398
+
399
+ gem 'devise'
400
+
401
+ gem 'devise-i18n'
402
+
403
+ gem 'devise-i18n-views'
404
+
405
+ gem 'image_processing'
406
+
407
+ gem 'mini_magick'
408
+
409
+ gem 'font-awesome-sass'
410
+
411
+ gem "aws-sdk-s3", require: false
412
+
413
+ gem 'omniauth'
414
+
415
+ gem 'omniauth-twitter'
416
+
417
+ ```
418
+
419
+
420
+
421
+ capistrano.logのエラーを読むと、Gemファイルのgroup :development, :testが
422
+
423
+ 無いってことになりますが、
424
+
425
+ 上記のQiitaだとこれでいいのですが
426
+
427
+ [AWSはこれで大丈夫](https://qiita.com/Yama-to/items/1e1d889e6d5f7cc7f281)
428
+
429
+ だとステージングにGemを追加してます。どうゆうことなんでしょうか