0

I'm trying to start my first production rails server on DigitalOcean but after

$ rails server — binding=my_Droplet_ip_address

i get this error

Exiting
/home/username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/handler.rb:78:in `require': cannot load such file -- rack/handler/— (LoadError)
from /home/glaux/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/handler.rb:78:in `try_require'
    from /home/glaux/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/handler.rb:16:in `get'
    from /home/glaux/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:290:in `server'

And so on.

App works fine locally and simple rails s on server also works fine.

I have Ubuntu 14.04 server with postgres, nginx and passenger.

I'm a complete newbie to it and I may have missed something important. So tell me if you want me to provide any other info on this matter.

Shiva
  • 11,485
  • 2
  • 67
  • 84
Seybo Glaux
  • 787
  • 1
  • 7
  • 16
  • Have you had a look at this? http://stackoverflow.com/questions/16647089/cannot-load-such-file-rack-handler-puma – XtraSimplicity May 07 '16 at 08:54
  • I think its ruby version issue, make sure the ruby you are using is `v 2.3.0` – Shiva May 07 '16 at 09:05
  • and its `rails s --binding=IP` not `rails s -- binding=IP` – Shiva May 07 '16 at 09:07
  • @XtraSimplicity yes, i stumbled upon it but it's a bit different matter i guess and i didn't understand how can i use it to solve my problem – Seybo Glaux May 07 '16 at 09:10
  • @SeyboGlaux, my theory was that it may've been an issue with the gems (and thus re-installing them might get you somewhere). Good to see that it wasn't the issue, however. :) – XtraSimplicity May 07 '16 at 09:13
  • @illusionist thanks! The space was a problem. I have copied this line from a tutorial and this mistake was there. Should have noticed it myself – Seybo Glaux May 07 '16 at 09:13

1 Answers1

0

Just try rails s -b 0.0.0.0 And stop previous port 3000 used by rails

To stop previous port. Try this command Lsof wni -p 3000

If you are running on 3000 port

rohin-arka
  • 779
  • 4
  • 10
Thorin
  • 2,004
  • 1
  • 19
  • 30