0

我正在使用 Rails 3.2.6 创建一个 Rails 应用程序。但是,我想连接 unicorn 和 nginx,但出现以下错误:

/path/to/home/.rvm/gems/ruby-1.9.3-p194/gems/unicorn-4.3.1/lib/unicorn/configurator.rb:492:in `working_directory': config_file=unicorn.conf.minimal.rb would not be accessible in working_directory=/path/to/rails/app (ArgumentError)

我认为我的配置文件是错误的,但是如何使用它们呢?

我用这个unicorn.conf.minimal.rb

working_directory "/path/to/rails/app"
listen "/path/to/app/tmp/sockets/unicorn.sock", :backlog => 64
listen 8080 # by default Unicorn listens on port 8080
worker_processes 2 # this should be >= nr_cpus
pid "/home/paisen/shour_teaser/config/unicorn/pids/unicorn.pid"
stderr_path "/path/to/rails/app/config/unicorn/log/stderr.log"
stdout_path "/path/to/rails/app/config/unicorn/log/stdout.log"
4

2 回答 2

2

看文字would not be accessible,可能是权限问题,请查看您的登录用户。

但很可能是配置的结果。

所以你认为my config files are wrong是一个 Nginx+Unicorn 最佳实践配置指南。

于 2012-12-11T04:18:11.617 回答
2

我知道这有点陈旧,但我遇到了这个问题,问题是我的 unicorn.rb working_directory 指向了错误的位置。修复后它就开始了。这是在 ubuntu 12.04 服务器上

bundle exec unicorn -c config/unicorn.rb -D
于 2013-04-06T20:30:37.677 回答