The following command could start the Rails daemon server for you Rails web application.
- rails s
Stopping the web server could be done by simply enter the Ctrl + C command in the terminal. But if your terminal session is disconnected, you have no way to stop the service. In that case, you have to kill the process directly.
First, find out the process ID of the Rails web server.
- ps -ef | grep script/rails
Kill the process directly
- kill -9 <Process ID>
Actually i wonder if there is a better way to stop the Rails web server. If you know it, please let me know. =P
Reference: How to stop the server in Rails
Update @ 2013-05-23: varmaavinash01 made a bash function for stopping the Rails Web Server. Thanks. =)