###前提・実現したいこと
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
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/30 05:04