Unicorn + NGINX:无法启动独角兽

时间:2012-01-11 02:06:12

标签: ruby-on-rails ruby-on-rails-3 nginx unicorn

我刚开始玩Unicorn和NGINX设置(任何全面的参考都会受到赞赏。我已经在google上爬了三天并编译了我的服务器在机架空间中运行的所有内容。)

继续我的问题。看起来我希望正确地设置NGINX指向我的rails应用程序的目录。它能够显示500错误页面。现在我正在开始独角兽

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上启动应用程序,我知道我需要超级用户权限才能绑定到低于1024的任何内容。但是当我尝试使用sudo时它会给我

sudo: unicorn_rails: command not found

任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:5)

尝试rvmsudo unicorn_rails -c /home/deployer/public_html/app/config/unicorn.rb