How to Access a Rails local server running on a Mac from another device.

March 26, 2020

From a terminal, use the following command to check the Private IP.

ifconfig en0

Use the -b option to bind to the loopback address (0.0.0.0) and start up a local server.

./bin/rails server -b 0.0.0.0

It can be accessed from within the LAN at http://IP.AD.RE.SS:3000.

By the way

You can check the Global IP with the following command.

curl ipecho.net/plain