1
私はnginxとunicornを持つUbuntu 14.04サーバーを持っています。私はcapistranoでRailsアプリケーションを/home/rails/myapp
に配備しました。ユニコーンは再起動できません: "ラックとRack :: Builderはconfig.ruを処理するために利用可能でなければなりません"
sudo service unicorn restart
とユニコーンを再起動しようとすると、私は、次を得る:
* Restarting Unicorn web server unicorn
rack not available, functionality reduced
rack and Rack::Builder must be available for processing config.ru
私のブラウザでサイトにアクセスしようとしたとき、私はnginxのから502を取得しています。
は、ここに私は、/ etc/default /ユニコーンファイルです:
# Change paramentres below to appropriate values and set CONFIGURED to yes.
CONFIGURED=yes
# Default timeout until child process is killed during server upgrade,
# it has *no* relation to option "timeout" in server's config.rb.
TIMEOUT=60
# Path to your web application, sh'ld be also set in server's config.rb,
# option "working_directory". Rack's config.ru is located here.
APP_ROOT=/home/rails/myapp/current
# Server's config.rb, it's not a rack's config.ru
CONFIG_RB=/etc/unicorn.conf
# Where to store PID, sh'ld be also set in server's config.rb, option "pid".
PID=/home/rails/myapp/current/pids/unicorn.pid
RAILS_ENV="production"
UNICORN_OPTS="-D -c $CONFIG_RB -E $RAILS_ENV"
PATH=/usr/local/rvm/rubies/ruby-2.3.0/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:/usr/local/rvm/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/gems/ruby-2.3.0/bin/
export GEM_HOME=/usr/local/rvm/gems/ruby-2.3.0
export GEM_PATH=/usr/local/rvm/gems/ruby-2.3.0:/usr/local/rvm/gems/[email protected]
DAEMON=/usr/local/rvm/gems/ruby-2.3.0/wrappers/unicorn
ここに私の/etc/unicorn.confファイルです:
listen "unix:/var/run/unicorn.sock"
worker_processes 4
user "rails"
working_directory "/home/rails/myapp/current"
pid "/var/run/unicorn.pid"
stderr_path "/var/log/unicorn/unicorn.log"
stdout_path "/var/log/unicorn/unicorn.log"
任意のアイデアは?私はすべてを試したような気がします。