4

Is it possible to perform a

rails server -b my.public.ip.address -p 8000

running this code obviously doesn't work. So I am wondering if there is a way to around this?

Sergio Tulentsev
  • 226,338
  • 43
  • 373
  • 367
Bad Hombre
  • 596
  • 5
  • 18
  • Do you want to run this in development env? http://stackoverflow.com/questions/36521114/unable-to-determine-ip-address-from-host-name/36522401#36522401 – 7urkm3n Sep 17 '16 at 13:44

1 Answers1

13

You can use rails server -b 0.0.0.0 -p 8000, and review the following things:

  • You use the port 8000 in your browser, Example http://<your-ip>:8000
  • You or you ISP don't have a firewall.
Sergio Rivas
  • 543
  • 3
  • 9
  • But that doesn't that work only locally? – Bad Hombre Sep 17 '16 at 13:45
  • You will need to set up port-forwarding on your router or use some sort of tunnelling service. See [duplicate question](http://stackoverflow.com/questions/39462317/boot-up-rails-app-make-request-to-app-from-outside-local-network#comment66245464_39462317). – Mick Sep 17 '16 at 13:57