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

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

新規登録して質問してみよう
ただいま回答率
85.48%
unicorn

Unicornは、汎用のRackアプリケーションサーバ。RackとWebサーバーの機能を併せ持ちます。レスポンス処理や、Nginx単体がRackの機能をサポートしていない事から、一般的にはNginx+Unicorn+Railsの構成を取って用います。

Ruby

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

nginx

nginixは軽量で高性能なwebサーバーの1つです。BSD-likeライセンスのもとリリースされており、あわせてHTTPサーバ、リバースプロキシ、メールプロキシの機能も備えています。MacOSX、Windows、Linux、上で動作します。

Ruby on Rails

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

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

解決済

1回答

1125閲覧

Capistranoでデプロイをしたい

mori_9

総合スコア5

unicorn

Unicornは、汎用のRackアプリケーションサーバ。RackとWebサーバーの機能を併せ持ちます。レスポンス処理や、Nginx単体がRackの機能をサポートしていない事から、一般的にはNginx+Unicorn+Railsの構成を取って用います。

Ruby

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

nginx

nginixは軽量で高性能なwebサーバーの1つです。BSD-likeライセンスのもとリリースされており、あわせてHTTPサーバ、リバースプロキシ、メールプロキシの機能も備えています。MacOSX、Windows、Linux、上で動作します。

Ruby on Rails

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

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

0クリップ

投稿2020/04/02 10:36

capistrano+unicorn+nginxを使ってポートフォリオのデプロイをしようとしたのですが、うまくいかずアドバイスをいただきたく投稿させていただきました。

試したこと unicornをkillコマンドにて停止させた後にbundle exec cap production deployを実行してデプロイを試みましたが下記のエラーが出ました
#ターミナル 00:14 unicorn:start 01 $HOME/.rbenv/bin/rbenv exec bundle exec unicorn -c /var/www/mytask2/current/config/unicorn.rb -E deployment -D 01 master failed to start, check stderr log for details #<Thread:0x00007fe9ab339ba8@/Users/morinaka/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): Traceback (most recent call last): 1: from /Users/morinaka/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' /Users/morinaka/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as ec2-user@13.112.251.194: bundle exit status: 1 (SSHKit::Runner::ExecuteError) bundle stdout: Nothing written bundle stderr: master failed to start, check stderr log for details (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as ec2-user@13.112.251.194: bundle exit status: 1 bundle stdout: Nothing written bundle stderr: master failed to start, check stderr log for details Caused by: SSHKit::Command::Failed: bundle exit status: 1 bundle stdout: Nothing written bundle stderr: master failed to start, check stderr log for details Tasks: TOP => unicorn:start (See full trace by running task with --trace) The deploy has failed with an error: Exception while executing as ec2-user@13.112.251.194: bundle exit status: 1 bundle stdout: Nothing written bundle stderr: master failed to start, check stderr log for details ** DEPLOY FAILED ** Refer to log/capistrano.log for details. Here are the last 20 lines: DEBUG [326ed4f8] Finished in 0.081 seconds with exit status 0 (successful). INFO [dddcb214] Running $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate as ec2-user@13.112.251.194 DEBUG [dddcb214] Command: cd /var/www/mytask2/releases/20200402102710 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.1" RAILS_ENV="production" ; $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate ) INFO [dddcb214] Finished in 2.051 seconds with exit status 0 (successful). INFO [aef75dc9] Running /usr/bin/env ln -s /var/www/mytask2/releases/20200402102710 /var/www/mytask2/releases/current as ec2-user@13.112.251.194 DEBUG [aef75dc9] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.1" ; /usr/bin/env ln -s /var/www/mytask2/releases/20200402102710 /var/www/mytask2/releases/current ) INFO [aef75dc9] Finished in 0.084 seconds with exit status 0 (successful). INFO [c727580e] Running /usr/bin/env mv /var/www/mytask2/releases/current /var/www/mytask2 as ec2-user@13.112.251.194 DEBUG [c727580e] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.1" ; /usr/bin/env mv /var/www/mytask2/releases/current /var/www/mytask2 ) INFO [c727580e] Finished in 0.083 seconds with exit status 0 (successful). DEBUG [b86fdf5c] Running if test ! -d /var/www/mytask2/current; then echo "Directory does not exist '/var/www/mytask2/current'" 1>&2; false; fi as ec2-user@13.112.251.194 DEBUG [b86fdf5c] Command: if test ! -d /var/www/mytask2/current; then echo "Directory does not exist '/var/www/mytask2/current'" 1>&2; false; fi DEBUG [b86fdf5c] Finished in 0.082 seconds with exit status 0 (successful). DEBUG [7ba878d6] Running [ -e /var/www/mytask2/shared/tmp/pids/unicorn.pid ] && kill -0 `cat /var/www/mytask2/shared/tmp/pids/unicorn.pid` as ec2-user@13.112.251.194 DEBUG [7ba878d6] Command: [ -e /var/www/mytask2/shared/tmp/pids/unicorn.pid ] && kill -0 `cat /var/www/mytask2/shared/tmp/pids/unicorn.pid` DEBUG [7ba878d6] bash: 0 行: kill: (7167) - そのようなプロセスはありません DEBUG [7ba878d6] Finished in 0.085 seconds with exit status 1 (failed). INFO [e24b778f] Running $HOME/.rbenv/bin/rbenv exec bundle exec unicorn -c /var/www/mytask2/current/config/unicorn.rb -E deployment -D as ec2-user@13.112.251.194 DEBUG [e24b778f] Command: cd /var/www/mytask2/current && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.1" RAILS_ENV="production" ; $HOME/.rbenv/bin/rbenv exec bundle exec unicorn -c /var/www/mytask2/current/config/unicorn.rb -E deployment -D ) DEBUG [e24b778f] master failed to start, check stderr log for details

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

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

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

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

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

guest

回答1

0

自己解決

解決方法

ローカルでの更新をリモートの方でpullできていなかったのが原因でした。

投稿2020/04/02 12:19

mori_9

総合スコア5

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問