Starting and stopping

The '-d' option runs it in the background. If you omitted the '-d' option, it would act in a similar manner to the webbrick server and requires an 'open' terminal. In that case, a standard 'Ctl -C' would kill the process.

To stop thin, you don't need to worry about finding the PID or searching for something to kill:

thin stop

Environment

The default environment for thin is development. To start it in a production environment is easy:

thin start -d -e production

Cluster

It would be relatively unusual for a Rails application to only need 1 ruby server; to start a cluster of 3 you would use this command:

thin start --servers 3

The output shows 3 servers being started sequentially from port 3000 (the default port).