<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>To start off, I opted to install Ubuntu 8.10 as my operating system of choice using the nifty interface provided by Linode.

After that I went about setting up the box, doing a bunch of apt-gets and a few wgets.  So I thought that I would put all this set up into a bash shell script, just in case I had to do it again in the future or that it might help anyone else who needed a RoR quick set up.  

So I went about looking at my history file and making the script.  I then deleted my blank and configured vps and restored a brand new copy of Ubuntu to test if it actually worked so I could post it here with a certain degree of confidence.

So this is what the script installs:

* Ruby Gems
* Ruby 
* Ruby on Rails (with version switch)
* Apache2
* Passenger  (including the passenger module)
* Mysql 5 
* RedCloth
* Vim
* Git
* haml (Because all your apps should be using this kick ass template language) 

It also installs a few dependency libraries so all the above apps install.  

All you have to do now is upload you app, and add a virtual host and away you go.

h2. Passenger

I did have a few issues with passenger.  For some silly reason I uploaded my app as root and tried to start Passenger.  Passenger does not like this (rightfully so).  If it detects that __environment.rb__ is owned by root it "bails":http://www.modrails.com/documentation/Users%20guide.html#user_switching  So make sure that your app is not owned by root.

So all this talk and no link?

Here is the file

"rails_linode.txt":/rails_linode.txt

You wil notice that I have a few variables at the top.  This is if you want to change the version of Ruby Gems or Rails.  I am using the 2.1 branch, so the script sets the version to that.  Pretty easy to change.

Let me know if anyone has any problems or improvements.

Hamza</body>
  <category-id type="integer">2</category-id>
  <comments-count type="integer">117</comments-count>
  <created-at type="datetime">2008-12-31T00:00:00Z</created-at>
  <id type="integer">26</id>
  <live type="boolean">true</live>
  <slug>linode-rails</slug>
  <summary>"!http://hamza.khan-cheema.com/images/linode_logo.png!":http://www.linode.com/?r=cbb442225d119fe4ef6ddf4128084a34e0604e1b 

As I stated in my "previous post":http://hamza.khan-cheema.com/posts/25-new-site I have just launched the redesign/redevelopment of my site.

Along with this change I am also using a new Virtual Machine Host called "Linode":http://www.linode.com/?r=cbb442225d119fe4ef6ddf4128084a34e0604e1b I am sure you know of them from "Rails Rumble":http://railsrumble.com as they provided the VPS for the competitors.  One of my friends recommended them to me last summer.

I have to say that I am very impressed with them so far.  I have been on a lot of VPS solutions and this is one of the fastest I have used and above all the price can't be beaten!

However before I deployed the new site, I had to install Ruby on Rails and all that goes along with it. 

I made a shell script that automated the entire set up process including installing Passenger and the required libraries. </summary>
  <title>Linode Ruby on Rails Setup Script</title>
  <updated-at type="datetime">2008-12-31T19:29:55Z</updated-at>
  <user-id type="integer">1</user-id>
</post>
