I specify the location of pid file in rails s command by appending --pid option.
rails s -d --pid ~/foo.pid
To stop the server, I use the following code.
kill -9 $(cat ~/foo.pid)
The problem is, the pid file created by the first command is found at /foo.pid, not ~/foo.pid.
How can I specify the pid file path in relative path in rails s command?
From a standard shell (bash)
The backticks execute the pwd (print working directory) command and substitutes the output in that spot.