3

I want to be able to access my development server from a machine outside of my home.
I have tried to run rvmsudo rails server -p 80, but when I try to access my computer with my IP, I get to the configuration page of my router...

Any ideas?

vtacreative
  • 618
  • 8
  • 22
ESoft
  • 852
  • 1
  • 8
  • 21
  • Possible duplicate: http://stackoverflow.com/questions/10220621/setting-up-the-webrick-to-serve-to-internet-my-rails-app – Kieran Andrews Nov 26 '12 at 22:26
  • For those who find this now: this was my issue: See my answer [here](http://stackoverflow.com/questions/7325663/access-webrick-rails-from-another-computer-on-local-network/28948293#28948293) – OneHoopyFrood Mar 09 '15 at 17:37

3 Answers3

8

Testing here, to me works like this:

-d = daemon service

-b 0.0.0.0 = make outside access enabled

So, the command is:

$ rails s -d -p 80 -b 0.0.0.0

I hope this can help you.

2

My guess is that you are already having a service (like apache web server) listening on port 80.

All you have to do, is pick a port that's unoccupied and bind the service to it.

rails s -d -p PORT_NUMBER

Then you must set up port-forwarding for that port.

Last but not least, if you have a dynamic (it changes over time) IP address (most common), you must always know your current IP. (http://whatismyip.com)

Then you can connect to your web app like this

http://CURRENT_IP_ADDRESS:PORT_NUMBER
0

Have you set up port forwarding on your router? What is the make and model of your router?

See there answers for more help:

Community
  • 1
  • 1
Kieran Andrews
  • 5,845
  • 2
  • 33
  • 57
  • Problem was that I was testing the external IP from within my home network. From outside it works well. – ESoft Nov 27 '12 at 07:34
  • Will a proxy work? I'm inside my network and have no way to try to connect from outside it so I've been using web proxies to fake connecting from outside. If the answer is yes then I have a problem because my address is reserved, my port is forwarded and my rails server is using binding 0.0.0.0 and I still can't connect using my WAN IP over a proxy. – Mark Kramer Mar 07 '17 at 05:23