Search code examples
ruby-on-railsnginxpuma

Puma is not working on server


I have rails 5 app running on my ubuntu 14.04 server on top of nginx. But when I am trying to start the rails app its throwing error

/usr/local/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/binder.rb:266:in initialize': Cannot assign requested address - bind(2) for "example.com" port 3000 (Errno::EADDRNOTAVAIL)

Solution

  • While RAILS is not my area, this sounds like either port 3000 is already in use, or DNS is failing to resolve the hostname example.com (which I'm aware is not the actual hostname)

    Check that this same system can ping the hostname, which is a quick way to tell if DNS is resolving it. If not, you can make an entry for it in the systems /etc/hosts file