Restart Ruby and Rails application

How to Restart  Ruby and Rails application by using ssh ? Ans : You can restart your ruby and rails application by using following command. Syntax : /usr/bin/ruby -I /home/USERNAME/ruby /usr/bin/mongrel_rails start -p PORT -d -e ENVIRONMENT -P log/mongrel.pid This should be executed in the root directory of the Rails app you wish to run on Mongrel. […]

Restart Ruby On Rails application

If you want to restart Ruby On Rails application for a particular domain or Application then follow the steps :    root@server[#] cd /home/username root@server[#] cd rails_apps root@server[#] cd demo (Application name) root@server[#] mongrel_rails mongrel::restart   Note: Replace the “username” equal to original cPanel username

Script to restart any service automatically

We can set the cron to restart the server when it was down or not running. You can use following script to detect and restart the httpd,ngnix,Serv-U or any other services. 1) Create the file vi /root/autorestart.sh and add the following code and save it. You can replace the Serv-U with any your service like […]