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

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

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

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

Ruby

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

AWS(Amazon Web Services)

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

Q&A

解決済

1回答

2328閲覧

AWSでunicornを使ったデプロイができない

hdknis

総合スコア7

unicorn

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

Ruby

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

AWS(Amazon Web Services)

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

0グッド

0クリップ

投稿2017/08/20 18:05

編集2017/08/20 18:07

###前提・実現したいこと
unicornでデプロイをしようとしているのですがエラーが出てしまいます
railsでデプロイしようとしています
unicornで再起動しようとしたらを実装中に以下のエラーメッセージが発生しました。

###発生している問題・エラーメッセージ
入力したコマンド
unicorn_rails master -c /home/hideki/comfort/config/unicorn.conf.rb -D -E production

home/hideki/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/unicorn-5.3.0/lib/unicorn/configurator.rb:702:in `parse_rackup_file': rackup file (master) not readable (ArgumentError) from /home/hideki/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/unicorn-5.3.0/lib/unicorn/configurator.rb:86:in `reload' from /home/hideki/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/unicorn-5.3.0/lib/unicorn/configurator.rb:77:in `initialize' from /home/hideki/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:77:in `new' from /home/hideki/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:77:in `initialize' from /home/hideki/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/unicorn-5.3.0/bin/unicorn_rails:209:in `new' from /home/hideki/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/unicorn-5.3.0/bin/unicorn_rails:209:in `<top (required)>' from /home/hideki/.rbenv/versions/2.3.1/bin/unicorn_rails:23:in `load' from /home/hideki/.rbenv/versions/2.3.1/bin/unicorn_rails:23:in `<main>' master failed to start, check stderr log for details

###該当のソースコード

unicorn.rbはこんな感じです app_path = File.expand_path('../../', __FILE__) worker_processes 1 working_directory app_path pid "#{app_path}/tmp/pids/unicorn.pid" stderr_path "#{app_path}/log/unicorn.stderr.log" stdout_path "#{app_path}/log/unicorn.stdout.log" listen 3000 timeout 60 preload_app true GC.respond_to?(:copy_on_write_friendly=) && GC.copy_on_write_friendly = true check_client_connection false run_once = true before_fork do |server, worker| defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect! if run_once run_once = false # prevent from firing again end old_pid = "#{server.config[:pid]}.oldbin" if File.exist?(old_pid) && server.pid != old_pid begin sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU Process.kill(sig, File.read(old_pid).to_i) rescue Errno::ENOENT, Errno::ESRCH => e logger.error e end end end after_fork do |_server, _worker| defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection end

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

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

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

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

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

guest

回答1

0

ベストアンサー

引数masterは不要ではないですか?

unicorn_rail -c /home/hideki/comfort/config/unicorn.conf.rb -D -E production

投稿2017/08/21 02:01

moonphase

総合スコア6621

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

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

hdknis

2017/08/30 05:04

解決できました!ありがとうございます
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.51%

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

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

質問する

関連した質問