我刚刚开始尝试设置 Unicorn 和 NGINX(任何完整的引用资料都会受到赞赏。我已经在 google 上爬行了三天并编译了让我的服务器在机架空间中运行所需的内容)。
继续我的问题。看起来我已经(希望是正确的)将 NGINX 设置为指向我的 Rails 应用程序的目录。它能够显示 500 错误页面。现在我正在启动 unicorn
unicorn_rails -c /home/deployer/public_html/app/config/unicorn.rb
它给了我这个错误
/home/deployer/.rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.1.1/lib/unicorn/socket_helper.rb:144:in `initialize': Permission denied - bind(2) (Errno::EACCES)
from /home/deployer/.rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.1.1/lib/unicorn/socket_helper.rb:144:in `new'
from /home/deployer/.rvm/gems/ruby-1.9.3-p0/gems/unicorn-4.1.1/lib/unicorn/socket_helper.rb:144:in `bind_listen'
我正在尝试在端口 80 上启动应用程序,并且我知道我需要 super 用户权限才能绑定(bind)到低于 1024 的任何端口。但是当我尝试使用 sudo 时,它会给我
sudo: unicorn_rails: command not found
如有任何帮助,我们将不胜感激!
最佳答案
尝试rvmsudo unicorn_rails -c/home/deployer/public_html/app/config/unicorn.rb
关于ruby-on-rails - unicorn +NGINX : cannot start unicorn,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8813278/