rvmsudo unicorn_rails -c config/unicorn/production.rb -D --env production is not working

517 views Asked by At

I have installed new ec2-instance for production server

when i tried the following command in the current folder

    [ec2-user@ip-xx-xxx-xxx-xxx current]$ rvmsudo unicorn_rails -c config/unicorn/production.rb 
    -D --env production

sudo: unicorn_rails: command not found

Please let me know how to start the production server which is running at port 80.

Thanks in advance

2

There are 2 answers

0
narstack On BEST ANSWER

For port 80: First run

export rvmsudo_secure_path=1

then

rvmsudo unicorn_rails -c config/unicorn/production.rb -D --env production

it will work for sure

0
Jeevan Dongre On

You dont have to use rvmsudo and all to start your unicorn app server. You can do it

bundle exec unicorn -D -c /path/to/app/unicorn.rb -E production