Is it possible to ssh into a server, start a Ruby program with Sinatra, and then log out of the ssh session, and still have the Sinatra server run? I have tried this, but it seems that when I log out of the server, the Sinatra server quits. Am I doing something wrong? If I can’t do this, how would I run Sinatra continuously?
Is it possible to ssh into a server, start a Ruby program with Sinatra
Share
This is usually due to the shell (for example bash) exiting and sending hangup or kill signals to all its child processes. To start the server in the background and shield it from the HUP signal you can use the command
nohup:For example:
http://en.wikipedia.org/wiki/Nohup
For more robust deployment options you might want to look at something like Nginx and/or Phusion Passenger:
Robust way to deploy a Rack application (Sinatra)