Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restarting Rails Server

I've inherited an existing Rails 2 application and am currently trying to deploy it on production servers.

As a rails/unix novice, what's the best way to find out what webserver the rails application is running on and how can I restart the server. (since from what I've read, rails will cache everything on production servers)

The previous developer used Capistrano, but unfortunately I don't have access to the GIT repository.

I noticed /configuration/deploy.rb has the following lines:

desc "Custom restart task for mongrel cluster"
task :restart, :roles => :app, :except => { :no_release => true } do
  deploy.mongrel.restart
end

desc "Custom start task for mongrel cluster"
task :start, :roles => :app do
  deploy.mongrel.start
end

desc "Custom stop task for mongrel cluster"
task :stop, :roles => :app do
  deploy.mongrel.stop
end

Does this imply mongrel_rails is being used?

If so what's the best way to restart the application to pick up my changes?

Many thanks.

like image 417
Donald Avatar asked Feb 15 '11 22:02

Donald


1 Answers

Does this imply mongrel_rails is being used?

Yes.

If so what's the best way to restart the application to pick up my changes?

It depends on which Application server you currently use. Assuming the current recipe is ok, simply call the Capistrano restart task.

$ cap deploy:restart
like image 187
Simone Carletti Avatar answered Oct 16 '22 14:10

Simone Carletti