How to open via internal IP?

(Disclaimer: I haven’t run rails like this myself - I use the docker-based development environment instead)

Are you sure about this? I have been caught out before because my browser had cached the discourse application and allowed me to browse between topics even though the server process wasn’t running. You might want to test using curl instead:

curl http://localhost:3000

You could also check to see if any ruby processes are running:

ps -ef | grep ruby

The netstat tool can tell you which processes are listening on which ports. For example, if I run a trivial python web server like this:

$ python3 -m http.server 8099
Serving HTTP on 0.0.0.0 port 8099 (http://0.0.0.0:8099/) ...

Then run netstat:

$ netstat -tlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address    Foreign Address   State    PID/Program name
tcp        0      0 0.0.0.0:8099     0.0.0.0:*         LISTEN   2511478/python3
...

That tells me PID 2511478 is listening on port 8099 on all interfaces (0.0.0.0 means “all interfaces”). To get a bit more information about that process:

$ ps -fp 2511478
UID          PID    PPID  C STIME TTY          TIME CMD
simon    2511478 1250783  0 09:53 pts/11   00:00:00 python3 -m http.server 8099
3 Likes