尝试以root身份运行Unicorn:sudo /usr/local/bin/unicorn -E production -c config/unicorn.rb
但获取rack not available, functionality reduced -- rack and Rack::Builder must be available for processing config.ru
。
如果我sudo bundle exec /usr/local/bin/unicorn [...]
我没有得到回复。
Unicorn在我的Gemfile中,我sudo gem install unicorn
。
我正在使用Ruby 2.2.4p230。这是版本不兼容吗?
配置/ unicorn.rb
user "myapp", "wheel"
working_directory "/home/www/myapp"
pid "/home/www/myapp/tmp/unicorn.pid"
stderr_path "/home/www/myapp/log/unicorn.log"
stdout_path "/home/www/myapp/log/unicorn.log"
listen "/home/www/myapp/tmp/unicorn.socket", :backlog => 64
listen 5000, :tcp_nopush => true
worker_processes 4
timeout 30