shajin
shajin

Reputation: 3264

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)?

Upvotes: 5

Views: 135

Answers (3)

Arsen7
Arsen7

Reputation: 12820

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.

Upvotes: 3

Surya
Surya

Reputation: 15992

if you are able to run rails console on your server then type this: Rails.root in your console or irb it will tell that project you are on belongs to which directory!

Upvotes: 2

Hitesh
Hitesh

Reputation: 825

no we cant know using process id. but when you start server you will find rails version like

:> ruby script/server
=> Booting Mongrel
=> Rails 2.3.10 application starting on http://0.0.0.0:3000

above line using rails 2.3.10 version and if you want to know ruby version simply call ruby -v in your command prompt

Upvotes: 0

Related Questions