Upgrading Ruby and installing Rails 2.3 with Passenger on a MediaTemple DV 3.5

I have a MediaTemple DV 3.5 server and I am a Rails developer. These things don’t go together out of the box. There’s a little bit of work involved in getting the DV up to speed with Ruby and Rails, but it’s really not that hard. Here’s how I upgraded Ruby to 1.9.1, installed RubyGems, and got Passenger (mod_rails) going with Apache.

Getting the server ready

First, you have to make sure you have root access to your server and that the MediaTemple Developer Tools are installed.

Now that you’ve confirmed that you have root and the Developer Tools are installed, you have to make sure yum is installed on the server. The good part about getting these things set up is that you’ll never have to do them again!

I find it annoying to preface every command with “sudo”, so all the following commands assume that you’ve entered a root shell with:

sudo su -

Upgrading Ruby

The default ruby on a DV 3.5 is version 1.8.5. Go ahead and uninstall that with the following command:

sudo yum remove ruby

Now install Ruby 1.9.1:

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p129.tar.gz
cd ruby-1.9.1-p129
./configure && make && make install

Now, install RubyGems:

cd ..
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
cd rubygems-1.3.5
ruby setup.rb

Check that you have the correct ruby installed by doing:

ruby -v

You should get something like this as output:

ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

Installing Rails and Passenger

Now that you’re this far, installing Rails is easy.

sudo gem install rails

That’s it for Rails. As for Passenger, you’re going to need a few more packages from yum for the installation to work:

yum install httpd-devel
gem install passenger
passenger-install-apache2-module

Now, we have to tell Apache to load Passenger when it starts up. The Passenger script probably told you that you had to include something like this in the httpd.conf:

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.4/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-2.2.4
PassengerRuby /usr/local/bin/ruby

Open up httpd.conf using nano and add these lines after the loooong list of other LoadModule directives:

nano /etc/htttpd/conf.d/httpd.conf

Now restart Apache:

service httpd restart

That’s it.

Post a Comment »

Name (required)

Email (will never be shared or displayed)

URL

Want me to remember your information?

Notify you of follow-up comments?

Comments

lacosteshoes said on 04/26/2010 at 12:55 AM

So cool !http://www.onlineord.com Lacoste Online Shop are waiting for you! We offer you the top quality http://www.onlineord.com Lacoste Shoes , you can chosse http://www.onlineord.com/mens-lacoste-shoes-white-black-c-326.html">mens lacoste shoes !

wisdoliu said on 05/26/2010 at 10:48 PM

Concert brings me unexpected surprises
Not long ago,Lucy and I was invited to participate in a music concert. We feel unprecedented excitement from our heart. , The whole situation of the investment,
the perfect music hall, those who live acting class ,there
is beautiful tune for our ear,as feeling as that we take part
in the portalble stages(http://www.inflightcases.com/Wholesale-flight-cases_c1267).  We listen over and over again ,
there are lots of pictures take on our sinht , then the
electronic keyboard lead us into the ideal space, we are
addicted to it, the play end, Lucy said words, “You see,
their flightcase is very special , like travel luggage,
have a built-in casters, can be moved any direction, looks
good solid ! “I also agree with her, at the same time, we
decided to buy a flightcase(http://www.inflightcases.com/Wholesale-flight-cases_c1267) because we are also like .

tagmingdao said on 07/07/2010 at 08:53 PM

</FONT><FONT size=1>アパレル 卸</FONT>

tagmingdao said on 07/08/2010 at 01:20 AM

aion rmt

  ラテール rmt

  リネージュ2 rmtt

cs5 said on 07/15/2010 at 03:17 AM

Open up httpd.conf using p90x dvd, adobe cs5 cs4, louis vuitton lv , 重庆国际快递,

aizyou said on 07/15/2010 at 09:27 PM

a good post

family law said on 07/15/2010 at 09:29 PM

aaaaaa

family law said on 07/15/2010 at 09:42 PM

I have made a Botox in san francisco , I feel youngger than before,the doctor told me to buy a Latisse in san francisco . But I have problem in my family , so I have learn about family law in Alameda County ,for divorce . after divorce I have to deal with Intellectual Property in San Ramon , because I have no work.
than I have to find a work , then I worked in the restaurant,milpitas ,the restaurant have chinese food , Japanese food and buffet . Now I have a good live.

Global Products said on 07/16/2010 at 03:44 AM

I am a cute girl from china, my english name is Jojo, running more places will make more friends
Now i am a senior student, my Hobbies is golf, design website, swim, drawing, photoshop, music, shopping, I will graduate from college, and now I begin to find Global Products, then i will sell it on B2B Marketplace, start a new beginning, friends give me five!

said on 07/18/2010 at 09:39 PM

famous watches

said on 07/27/2010 at 02:19 AM

It’s a beautiful day today. stone-in-San-Francisco I get up at seven o’clock and wash my face、brush my teeth at seven ten in the morning. tile-in-San-FranciscoI do some sports in the park around my house. granite-in-San-FranciscoAnd I eat my breakfast at ten to eight.  marble-in-San-FranciscoI walk to my company and arrive there at a quarter past eight.

said on 07/27/2010 at 02:41 AM

It’s a beautiful day today. stone-in-San-Francisco I get up at seven o’clock and wash my face、brush my teeth at seven ten in the morning. tile-in-San-FranciscoI do some sports in the park around my house. granite-in-San-FranciscoAnd I eat my breakfast at ten to eight.  marble-in-San-FranciscoI walk to my company and arrive there at a quarter past eight. stone-in-Danville
I start to work at half past eight. tile-in-Danville
At noon, we eat lunch in the company together. granite-in-Danville
We enjoy this style eating together. marble-in-Danville
The rest is so short so I always sleepy in the afternoon. But I take good advantage of this short time.

This is only here because I think it looks cool.

I'm Georges and I live in Toronto. I am a web developer and it's fun. This is a collection of things that I like and a place for me to record my thoughts on things.

Last Entry

Watch the Daily Show and the Colbert Report in Canada

Topics

Pointless Statistics

Total Entries: 6
Total Comments: 40
Most Recent Entry: 08/26/2009 05:58 pm
Most Recent Comment on: 08/20/2010 10:41 pm
Most Recent Visitor on: 09/03/2010 02:53 pm
The most visitors ever was 36 on 08/23/2008 08:06 pm