/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
namespace :server do desc "restart server" task :restart do system "thin restart -C /etc/thin/#{server_name}.yml" end desc "stop server" task :stop do system "thin stop -C /etc/thin/#{server_name}.yml" end desc "start server" task :start do system "thin start -C /etc/thin/#{server_name}.yml" end def server_name File::basename(Rails.root) end end