You can tell your development server to listen on your publicly accessible interface:
If you're running a server via rails server
, you can specify the IP to listen on via -b <ip>
or --binding=<ip>
. By default, the server listens on 0.0.0.0, that is, only for local connections.
Usage: rails server [mongrel, thin, etc] [options]
-p, --port=port Runs Rails on the specified port.
Default: 3000
-b, --binding=ip Binds Rails to the specified ip.
Default: 0.0.0.0
You can instead find out what your machine's network address is and bind to that address instead, but you will have to forward ports and figure out what your publicly routable IP address is on the Internet; this is outside the bounds of Stack Overflow.