Search code examples
ruby-on-railsunicorn

Why I am not able to run Unicorn RoR


I am trying to install a RoR server on Amazon EC2 using Amazon Linux and Ansible. Everything goes through fine, at the end I am not able to run unicorn. I have checked that unicorn gem is installed

`gem list | grep unicorn` 

showed unicorn installed.

When I type

`unicorn_rails` 

I get command not found error. I checked my gem file and it has the line gem unicorn then I run bundle install and the output has unicorn in the list. Still not able to run it.

Thanks.


Solution

  • I'm not sure that you can run unicorn_rails. Just use:

    bundle exec unicorn -p <port> -c <path_to_config_file>
    

    For example:

    bundle exec unicorn -p 3000 -c ./config/unicorn.rb