ruby-on-rails - unicorn +NGINX : cannot start unicorn

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

我刚刚开始尝试设置 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/

相关文章:

ruby-on-rails-3 - Rails 3 - 通过 rspec 正确测试 PUT 方法

ruby-on-rails - 在 Rails 3 中使用 group by 查询中以整数形式获取 COUNT(column)

django - Amazon Linux EC2实例上的uWSGI安装异常

javascript - nginx 请求的资源上不存在 'Access-Control-Allow-Origin' header

jquery - 在 rails-jquery-autocomplete 中使用额外的搜索字段

ruby-on-rails - 向 Rails 中的所有表单添加隐藏输入字段

css - 使用 rails collection_select 表单助手更改 'include_blank' 文本的样式

ruby-on-rails - Rails - 如何检测是否提供了 content_for 内容?

mysql - 带有 mysql 问题的 Rails 3

nginx - 简单配置 Nginx 和 Varnish