Capistrano Series - Installing Apache with Passenger (mod_rails) Support

One of the last things that we need to do is install Apache as our webserver, with Rails support via Passenger (mod_rails).

Passenger is an exciting development in Rails deployment, as it allows us to use a single webserver without the need to configure proxies. It supports both Apache and Nginx — for these articles we will be using Apache.


Capistrano Series - Installing Ruby, RubyGems and SQLite3

Continuing with setting up the Slice, now we need to install Ruby, RubyGems and SQLite.

We'll install Ruby via aptitude and then install RubyGems from source (as that will give us the latest version.)

Once done, we can go ahead and install SQLite3, a lightweight database, via aptitude.


Debian Lenny - using passenger to serve your applications with Apache

Following from the first article, we now have passenger (mod_rails) installed.

As such, we can move on and create a Ruby on Rails application and see how easy it is to serve using passenger.


Debian Lenny - Installing Passenger with Apache

Phusion's Passenger (mod_rails) is an exciting development in serving your Ruby on Rails application with the Apache web server.

Incredibly simple to install and use, you can have a rails application up and running in no time. You don't even have to worry about ports or setting up a proxy to another server.


Capistrano Series - Setting up Git

So now the Slice is setup and ready for our Ruby on Rails with Capistrano stack.

Let's get straight on and install git and set up a repository.


Capistrano series - Setting up your Slice

So, following from the introduction, you have a new Ubuntu Hardy Slice and want to follow the mini series to a fully functional Capistrano, git and Ruby on Rails stack.

Well, the first thing you need to do is add a new user (you never normally log in as root) and secure the Slice. Then you need to update to the latest packages and install some basic work tools.


Capistrano Series - Introduction to Capistrano 2

Before delving into the mini series, an introduction and explanation of what Capistrano is and what it does is needed.

Once setup, deploying your application changes (and it doesn't have to be Ruby on Rails) is a breeze with Capistrano.


Debian Lenny - Installing MySQL (with Rails and PHP options)

We've already covered how to install MySQL on Debian Lenny, but now we need to prepare our Rails or PHP installations to make use of it.

In this article we will look at what other packages are needed for MySQL to integrate with Ruby on Rails and with a standard PHP install.


Capistrano Series - Introduction

Welcome to the 'new and improved' Capistrano mini-series. We have updated these articles to work with Ubuntu Hardy, git (instead of subversion) and using the latest version of Capistrano (at the time of writing).

This first article will flesh out the aim of the series and explain what the end goal is.

Please don't skip this article as it will contain some important information...


CentOS - Nginx, Rails, and Mongrels

Following from the mongrel and mongrel cluster article, we can now look at configuring Nginx to proxy to a mongrel cluster so we can serve our Ruby on Rails application.

The process is very easy and can simply be repeated for serving multiple domains.


CentOS - Apache, Rails, and Mongrels

Following from the mongrels and mongrel cluster article, we can now look at creating and configuring Apache to proxy to a mongrel cluster so we can serve our Ruby on Rails application.


CentOS - Mongrel and mongrel_cluster installation

There are variety of options open to the sysadmin when serving Ruby applications.

One of the original ways is to use the mongrel web server. Requests are proxied to the mongrel(s) from the main web server (Apache, Nginx, etc).

The article may seem quite lengthy but two subjects are tackled here. One is the basic mongrel gem itself but then we move onto the mongrel_cluster gem.

Take each section at a time as each one builds on the previous explanation.


CentOS - Nginx, Rails and Thin

Having installed the thin web server for Ruby, we can now look at configuring a Nginx vhost to proxy to thin so we can serve our Ruby on Rails application.

The process is easy to follow and easy to repeat for hosting multiple domains.


CentOS - Apache, Rails and thin

Following from the thin web server for Ruby article, let's look at creating and configuring Apache to proxy to thin so we can serve our Ruby on Rails application.


CentOS - thin web server for Ruby

There are variety of options open to the sysadmin when serving Ruby applications.

One of them is thin. This is a 3rd party web server that is proxied to from the main web server (similar to mongrels in a general setup). Let's take a look at installing thin.


CentOS - using mod_rails to serve your application

Following from the first article, we now have passenger (mod_rails) installed.

As such, we can move on and create a Ruby on Rails application and see how easy it is to serve using passenger.


Debian Lenny - Ruby on Rails

In the Debian Lenny setup articles (page 1 and page 2) we secured, updated and personalized the install and we should be ready to add some working software.

We also installed the build-essential package. Now we can go ahead and install Ruby on Rails.


CentOS - mod_rails installation

Phusion's Passenger (mod_rails) is an exciting development in serving your Ruby on Rails application with the Apache web server.

Incredibly simple to install and use, you can have a rails application up and running in no time. You don't have to worry about ports or setting up a proxy to another server.


CentOS - Installing MySQL (with Rails and PHP options)

Installing MySQL on CentOS is very simple using the 'yum' package manager.

This article will go through the install process and also look at what other packages are needed for MySQL to integrate with Ruby on Rails and with a standard PHP install.


CentOS - Ruby on Rails

In the CentOS setup articles (page 1 and page 2) we secured, updated and personalized the install to add some working software.

We also installed the development tools package. Now we can go ahead and install Ruby on Rails.


Ubuntu Intrepid - Nginx, rails and thin

Having installed the thin web server for Ruby, we can now look at configuring an Nginx vhost to proxy to thin so we can serve our Ruby on Rails application.

The process is easy to follow and easy to repeat for hosting multiple domains.


Ubuntu Intrepid - Nginx, rails and mongrels

Following from the mongrel and mongrel cluster article, we can now look at configuring Nginx to proxy to a mongrel cluster so we can serve our Ruby on Rails application.

The process is very easy and can simply be repeated for serving multiple domains.


Ubuntu Intrepid - Apache, Rails and thin

Following from the thin web server for Ruby article, let's look at creating and configuring Apache to proxy to thin so we can serve our Ruby on Rails application.


Ubuntu Intrepid - Apache, Rails and mongrels

Following from the mongrel and mongrel cluster article, we can now look at creating and configuring Apache to proxy to a mongrel cluster so we can serve our Ruby on Rails application.


Ubuntu Intrepid - mongrel and mongrel cluster

There are variety of options open to the sysadmin when serving Ruby applications.

One of the original ways is to use the mongrel web server. Requests are proxied to the mongrel(s) from the main web server (Apache, Nginx, etc).


Ubuntu Intrepid - thin web server for Ruby

There are variety of options open to the sysadmin when serving Ruby applications.

One of them is thin. This is a 3rd party web server that is proxied to from the main web server (similar to mongrels in a general setup). Let's take a look at installing thin.


Ubuntu Intrepid - using mod_rails to serve your application

Following from the first article, we now have passenger (mod_rails) installed.

As such, we can move on and create a Ruby on Rails application and see how easy it is to serve using passenger.


Ubuntu Intrepid - mod_rails installation

Phusion's Passenger (mod_rails) is an exciting development in serving your Ruby on Rails application with the Apache web server.

Incredibly simple to install and use, you can have a rails application up and running in no time. You don't have to worry about ports or setting up a proxy to another server.


Ubuntu Intrepid - Ruby on Rails

In the Ubuntu Intrepid setup articles (page 1 and page 2) we secured, updated and personalised the install ready to add some working software.

We also installed the build-essential package. Now we can go ahead and install Ruby on Rails.


Ubuntu Hardy - Installing MySQL (with Rails and PHP options)

Installing MySQL on Ubuntu Hardy is very simple using the 'aptitude' package manager.

This article will go through the install process and also look at what other packages are need for MySQL to integrate with Ruby on Rails and with a standard PHP install.


Ubuntu Hardy - Apache, Rails and mongrels

Following from the mongrel and mongrel cluster article, we can now look at creating and configuring Apache to proxy to a mongrel cluster so we can serve our Ruby on Rails application.


Ubuntu Hardy - mongrel and mongrel clusters

There are variety of options open to the sysadmin when serving Ruby applications.

One of the original ways is to use the mongrel web server. Requests are proxied to the mongrel(s) from the main web server (Apache, Nginx, etc).


Ubuntu Hardy - Apache, Rails and thin

Following from the thin web server for Ruby article, let's look at creating and configuring Apache to proxy to thin so we can serve our Ruby on Rails application.


Ubuntu Hardy - thin web server for Ruby

There are variety of options open to the sysadmin when serving Ruby applications.

One of them is thin. This is a 3rd party web server that is proxied to from the main web server (similar to mongrels in a general setup). Let's take a look at installing thin.


Ubuntu Hardy - using mod_rails to serve your application

Following from the first article, we now have passenger (mod_rails) installed.

As such, we can move on and create a Ruby on Rails application and see how easy it is to serve using passenger.


Ubuntu Hardy - mod_rails installation

Phusion's Passenger (mod_rails) is an exciting development in serving your Ruby on Rails application with the Apache web server.

Incredibly simple to install and use, you can have a rails application up and running in no time. You don't have to worry about ports or setting up a proxy to another server.


Ubuntu Hardy - Ruby on Rails

In the Ubuntu Hardy setup articles (page 1 and page 2) we secured, updated and personalised the install ready to add some working software.

We also installed the build-essential package. Now we can go ahead and install Ruby on Rails.


Capistrano series - alternative subversion setups

In the main Capistrano series, we set it up so that the main repository could only be access from the local workstation (so a deployment would checkout the repo to the workstation, zip it up, upload it and then unzip it).

This is great from a security point of view, but what if the subversion repository is on the same Slice as the application (as is the case with many people)?


Capistrano series - database migrations

The basic setup of a Slice and deploying an application from your workstation via Capistrano is now completed.

However, there is one thing left that needs an introduction, and that is how to handle database migrations when deploying your app.


Capistrano series - deploying application changes

So, we have Nginx and Capistrano setup and we've deployed our application for the first time. Everything seems to be zinging along very nicely.

What happens now though? How do I deploy any future application changes?

Let's take look.


Capistrano series - application vhost creation

Well, we've deployed our application to the Slice and seen Capistrano at work but, perhaps a little frustratingly, we couldn't actually browse the site as we hadn't set up a virtual host.

Let's do that now and, with our previous knowledge of Nginx and vhosts, it won't take much time at all.


Capistrano series - configuring Capistrano #2

So now Capistrano has created the base structure for the application deployment, we need to look at actually deploying it.

Let's look at some of the settings we need for this and then deploy the application for the first time.


Capistrano series - configuring Capistrano #1

We're at a crucial stage with our Ruby on Rails with Capistrano stack as we have all the pieces installed and a lot has been configured.

Now we need to look at the Capistrano configuration file and see what needs adding.


Capistrano series - local setup and Capistrano

Well, we've nearly done the work needed on the Slice so now we can concentrate on setting up our local workstation and installing Capistrano.

Remember that the subversion repository will hold the application revisions and Capistrano will deploy any changes from our workstation to the Slice.


Capistrano series - Nginx vhosts, rails and mongrels

One of the last things we need to do on the Slice is setup Ruby on Rails and install the mongrel application server which Nginx will proxy requests to.

Easily done. We'll even look at setting up a vhost to test the setup before moving onto the Capistrano install.


Ubuntu Gutsy - Nginx vhosts, rails and mongrels

There are several ways of serving a Ruby on Rails application, one of which is to use Nginx to proxy requests to mongrels.

There are a few ways of completing this and we're going to look at one solution. Other methods, such as using a mongrel cluster will be looked at in future articles.


Capistrano series - installing Ruby, Nginx and sqlite3.

Continuing with setting up the Slice, we need to install Ruby, rubygems and Nginx.

We'll install Ruby via aptitude and then install rubygems from source (as that will give us the latest version).

Once done, we can go ahead and install Nginx, a lightweight web server, via aptitude.


Capistrano series - setting up subversion

So now the Slice is setup and ready for our Ruby on Rails with Capistrano stack.

Let's get straight on and install subversion and set up a repository with SSH access.


Capistrano series - Setting up your Slice

So you have your new Ubuntu Gutsy Slice and want to follow the mini series to a fully functional Capistrano and Ruby on Rails stack.

Well, the first thing you need to do is add a new user (you never normally log in as root) and secure the Slice. Then you need to update to the latest packages and install some basic work tools.


Capistrano series - introduction

Welcome to the first Slicehost mini series.

This first article will flesh out the aim of the series and explain what the end goal is.

Please don't skip this article as it will contain some important information...