سؤال

I just started playing around with Unicorn and NGINX set up (any full-blown reference would be appreciated. I have been crawling through google for three days and compile what I have to get my server running in rackspace).

Continuing to my question. It looks like I have, hopefully correctly, set up NGINX to point to the directory of my rails app. It was able to show the 500 error page. Now I am in the process of starting unicorn

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

and it gives me this error

/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'

I am trying to start the app on port 80 and I know that I need superuser permission to bind to anything lower than 1024. But when I try to use sudo it gives me

sudo: unicorn_rails: command not found

Any help would be appreciated!

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top