Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telling which ruby on rails project is running

My client wants me to download a working ruby on rails project to my local system. But when I connected to a server, I got nine identical project folders (which seem like different versions). Is there a way to know which project is running using process id (I have only the process id)?

like image 758
shajin Avatar asked Oct 11 '22 00:10

shajin


1 Answers

If you have the process ID, then check /proc/[pid]/cwd symbolic link. This is the process' current directory.

I assume that you are on a Linux-like system.

If you are not, then you may issue a HTTP request (to wake up the rails app) and then look which logfile has been modified recently.

like image 167
Arsen7 Avatar answered Oct 13 '22 13:10

Arsen7