###前提・実現したいこと
デプロイしたrailsアプリをnginxに表示したいです。
###発生している問題・エラーメッセージ
bundle exec unicorn -c config/unicorn/staging.rb -E production -Dコマンド実行
/usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/lib/unicorn/configurator.rb:538:in `working_directory': config_file=config/unicorn/staging.rb would not be accessible in working_directory=/home/deploy/staging/current (ArgumentError) from config/unicorn/staging.rb:4:in `reload' from /usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/lib/unicorn/configurator.rb:72:in `instance_eval' from /usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/lib/unicorn/configurator.rb:72:in `reload' from /usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/lib/unicorn/configurator.rb:65:in `initialize' from /usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:76:in `new' from /usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:76:in `initialize' from /usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/bin/unicorn:126:in `new' from /usr/local/rvm/gems/ruby-2.3.0/gems/unicorn-5.2.0/bin/unicorn:126:in `<top (required)>' from /usr/local/rvm/gems/ruby-2.3.0/bin/unicorn:22:in `load' from /usr/local/rvm/gems/ruby-2.3.0/bin/unicorn:22:in `<main>' from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval' from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
エラー内容は、パスが間違っているとのことですが、
ディレクトリ通りにパスをしているにもかかわらず通せません。
何かが間違っているんですが、
わかりません。
###該当のソースコード
config/unicorn/staging.rb
base = "/home/deploy/staging" current_path = "#{base}/current" shared_path = "#{base}/shared" working_directory "/config/unicorn/staging.rb"★★ worker_processes 2 preload_app true timeout 30 stderr_path "#{current_path}/log/unicorn.stderr.log" stdout_path "#{current_path}/log/unicorn.stdout.log" listen "/tmp/unicorn.staging.sock" pid "#{shared_path}/tmp/pids/unicorn.pid" #ダウンタイム無し preload_app true before_fork do |server, worker| ENV['BUNDLE_GEMFILE'] = File.expand_path('Gemfile', current_path) old_pid = "#{server.config[:pid]}.oldbin" if File.exists?(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 # someone else did our job for us end end end after_fork do |server, worker| defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end
調べたのですが、
unicorn各々のメソッドの説明が乗って入るものが見当たりません。
もし、資料だけでも知っている方ご紹介してください。
ユーザー権限の問題でしょうか?
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/01/27 06:42