Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the relationship between Passenger and Capistrano?

I am relatively inexperienced in rails and I am confused by where Capistrano fits into the rails app life cycle.

From my understanding the following steps are involved in getting a rails app completed.

  1. Select and set up a host (e.g linode)
  2. Install apache2
  3. Install rvm
  4. Install ruby and install rails
  5. Install passenger
  6. Create an application and test at domain.com:3000 by using 'rails s' command

However it is not clear to me how the next steps work. In particular:

a) The live rails app needs to run in production mode at domain.com, I presume passenger does this?

b) If I have created the app at domain.com:3000 do I need to do anything in the rails config before it works at domain.com?

c) Where does capistrano fit in? If passenger can make my app work at domain.com, what does capistrano do?

like image 859
Zakoff Avatar asked Mar 19 '12 08:03

Zakoff


1 Answers

a) Exactly, passenger working with a web server like Apache does this for you.

b) Your local web server is not the same with Passenger. To set it up in your domain, you would need to normally create your domain and set a website as you normally set a website in your apache(or other) configuration.

c) Capistrano is a gem that allows you to write scripts which automate things, like restarting the web server, or setting particular production versions and so on.

For more information on Capistrano :

http://railscasts.com/episodes/133-capistrano-tasks

like image 103
Spyros Avatar answered Nov 15 '22 01:11

Spyros