我正在尝试使用nginx和unicorn运行Ruby on Rails应用程序。设置unicorn配置文件' unicorn.rb'当我尝试执行此命令时
bundle exec unicorn -c config/unicorn.rb -D
它会抛出以下错误:
/home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/lib/unicorn/configurator.rb:537:in `working_directory': config_file=config/unicorn.rb would not be accessible in working_directory=/home/vagrant/home (ArgumentError)
from config/unicorn.rb:3:in `reload'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/lib/unicorn/configurator.rb:72:in `instance_eval'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/lib/unicorn/configurator.rb:72:in `reload'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/lib/unicorn/configurator.rb:65:in `initialize'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/lib/unicorn/http_server.rb:76:in `new'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/lib/unicorn/http_server.rb:76:in `initialize'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/bin/unicorn:126:in `new'
from /home/vagrant/.rvm/gems/ruby-2.2.1/gems/unicorn-5.0.0/bin/unicorn:126:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.2.1/bin/unicorn:23:in `load'
from /home/vagrant/.rvm/gems/ruby-2.2.1/bin/unicorn:23:in `<main>'
from /home/vagrant/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /home/vagrant/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
master failed to start, check stderr log for details
我在ubuntu-vagrant设置中运行,我的应用程序位于以下目录中:
/home/vagrant/home/my-app
配置文件(unicorn.rb)位于以下目录中:
/home/vagrant/home/my-app/config
文件(unicorn.rb)包含以下配置:
working_directory "/home/vagrant/home/"
pid "/home/vagrant/home/temp/pids/unicorn.pid"
stderr_path "/home/vagrant/home/log/unicorn.log"
stdout_path "/home/vagrant/home/log/unicorn.log"
listen "/tmp/unicorn.expertiza.sock"
worker_processes 2
timeout 30
我不明白我哪里错了。即使是错误陈述也没有多大意义。有人可以提供一些帮助。