<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Greg Goodwin</title>
	<atom:link href="http://greggoodwin.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://greggoodwin.wordpress.com</link>
	<description>Software Engineer</description>
	<lastBuildDate>Sun, 22 May 2011 00:47:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='greggoodwin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6e43b441fa9dd7b1682bde862e1804e1?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Greg Goodwin</title>
		<link>http://greggoodwin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://greggoodwin.wordpress.com/osd.xml" title="Greg Goodwin" />
	<atom:link rel='hub' href='http://greggoodwin.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Install Ruby on Rails with Passenger on MediaTemple DV 3.5 &#124; How To</title>
		<link>http://greggoodwin.wordpress.com/2009/03/01/install-ruby-on-rails-with-passenger-on-mediatemple-dv-35-how-to/</link>
		<comments>http://greggoodwin.wordpress.com/2009/03/01/install-ruby-on-rails-with-passenger-on-mediatemple-dv-35-how-to/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 21:51:29 +0000</pubDate>
		<dc:creator>Greg</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[media temple]]></category>
		<category><![CDATA[mediatemple]]></category>
		<category><![CDATA[mt]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://greggoodwin.wordpress.com/?p=11</guid>
		<description><![CDATA[Important! This blog is no longer maintain I have moved to self-hosted wordpress. You can find an updated post (as of 5-21-2011) @ greggoodwin.com Updated 10/22/2009 to reflect new stable versions of the software used. The following article is a summary of the 3 days I spent trying to get this to work. The installation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=greggoodwin.wordpress.com&amp;blog=4182578&amp;post=11&amp;subd=greggoodwin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-12" title="railsmt" src="http://greggoodwin.files.wordpress.com/2009/03/railsmt.png?w=200&#038;h=200" alt="railsmt" width="200" height="200" /></p>
<p><span style="color:#ff0000;"><strong>Important! This blog is no longer maintain I have moved to self-hosted wordpress. You can find an updated post (as of 5-21-2011) @ <span style="color:#0000ff;"><a href="http://greggoodwin.com"><span style="color:#0000ff;">greggoodwin.com</span></a></span></strong></span></p>
<p><strong>Updated 10/22/2009 to reflect new stable versions of the software used.</strong></p>
<p>The following article is a summary of the 3 days I spent trying to get this to work. The installation is not the same installation explained by Passenger&#8217;s website and a ton of other websites. This article pertains to <a href="http://rubyonrails.org" target="_blank">Ruby on Rails</a>, <a href="http://mediatemple.net" target="_blank">Media Temple</a> and <a href="http://www.modrails.com/" target="_blank">Passenger</a> for Apache a simple to use replacement for Mongrel.</p>
<p>First of all you have to have a fresh (or re-imaged) DV 3.5 account with MediaTemple otherwise this article does not apply to you.</p>
<ol>
<li>Go to your MediaTemple account center and click the domain you are using. You will then see a link labeled <strong>Root Access &amp; Developer Tools</strong>. Go there and <strong>activate both</strong>.</li>
<li>Open up you favorite ssh program to access to the great unix command line of your dedicated server. I use plain old terminal on Mac OSX.</li>
<li>Login to your server with the command <strong>ssh root@yourdomain.com</strong></li>
<li>Run the following command to update your CentOS <strong>rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm</strong></li>
<li>Do the same with this command <strong>rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm</strong></li>
<li>Use YUM to remove the current Ruby install so we can update to the latest version by running <strong>yum remove ruby</strong></li>
<li>Change to your opt directory <strong>cd /opt</strong></li>
<li>Get the current Ruby build, I am providing a link for 1.8.7 which is the current version as of 2-24-2009 <strong>wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz</strong></li>
<li>Now run the tar command to extract the archive we just downloaded <strong>tar -zxvf </strong><strong>ruby-1.9.1-p243.tar.gz</strong></li>
<li>Now we are going to create a link so you can access ruby without added the version numbers <strong>ln -s </strong><strong>ruby-1.9.1-p243</strong><strong> ruby</strong></li>
<li>Now lets head to our ruby directory <strong>cd ruby</strong></li>
<li>Run the command to install ruby <strong>./configure &amp;&amp; make &amp;&amp; make install</strong></li>
<li>Lets pop out of this directory now <strong>cd ../</strong></li>
<li>We should now grab the latest RubyGems version which is 1.3.1 as of 2-24-2009 <strong>wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz</strong></li>
<li>Uncompress the archive <strong>tar -zxvf </strong><strong>rubygems-1.3.5.tgz</strong></li>
<li>Goto the new directory <strong>cd </strong><strong>rubygems-1.3.5</strong></li>
<li>Run the setup to install RubyGems <strong>ruby setup.rb</strong></li>
<li>Now that we have gems installed we can start installing things in a much more simple manner. Start with Rails. <strong>gem install rails</strong></li>
<li>Now we will install Passenger the great Apache RoR app that we will be using instead of mongrel. <strong>gem install passenger</strong></li>
<li>We need to run one additional command to get Passenger setup <strong>passenger-install-apache2-module</strong></li>
</ol>
<p>That was the basic installation process. Now we will move on to the account specific modifications that are required to get this to work with MediaTemple. Pay attention to the text don&#8217;t just copy and paste there will be lines you need to modify. Pay attention to anything that say <strong>yourdomain.com. You need to replace this with your actual domain.</strong></p>
<ol>
<li>First things first backup your apache config file. <strong>cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.backup</strong></li>
<li><strong>You may need to edit these paths depending on what the current version of passenger is.</strong> We will now use the unix built in vi editor to edit our config file. Do this by running <strong>vi /etc/httpd/conf/httpd.conf</strong> then we scroll down to the section that has all the LoadModules commands. Go to the last space and <strong>press i to enter insert mode</strong>. Add the following to your file. <strong><br />
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so<br />
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3<br />
PassengerRuby /usr/local/bin/ruby </strong><br />
now just <strong>press escape</strong> to exit insert mode. Type :<strong>w and press enter</strong> then type <strong>:q and enter</strong>. You should be back at the console prompt.</li>
<li>Apache is now setup correctly. Next we will create a nifty little file that MT uses for VirtualHosts. This is where things get different since normally you would put this info in the apache config. Create a new file by typing the following<strong> vi /var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span>/conf/vhost.conf </strong>then <strong>press i</strong> to enter insert mode. Copy and paste the following text. <strong>ServerName <span style="color:#ff0000;">yourdomain.com</span><br />
ServerAlias www.<span style="color:#ff0000;">yourdomain.com</span><br />
DocumentRoot /var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span>/rails/<span style="color:#ff0000;">yourappname</span>/public<br />
&lt;Directory &#8220;/var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span>/rails/<span style="color:#ff0000;">yourappname</span>/public&#8221;&gt;<br />
Options FollowSymLinks<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
&lt;/Directory&gt;<br />
RailsBaseURI / </strong>then <strong>press escape</strong> to exit insert mode. Then type <strong>:w and enter</strong> then <strong>:q and enter</strong>. Your back at the command line.</li>
<li>Let create our rails directory now<strong> </strong>so we can setup our app. <strong>cd /var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span></strong> then <strong>mkdir rails</strong> the <strong>cd rails</strong></li>
<li>Now we can create our rails application by typing <strong>rails <span style="color:#ff0000;">yourappname</span></strong></li>
<li><span style="color:#ff0000;"><span style="color:#000000;">Your rails app will be created now we have to give your user account that you use on MT permission by typing <strong>chown -R <span style="color:#ff0000;">yourusername</span>:psaserv <span style="color:#ff0000;">yourappname</span></strong></span></span><strong></strong></li>
<li><span style="color:#ff0000;"><span style="color:#000000;">Almost done, let&#8217;s move our httpdocs directory before we create a link. <strong>mv /var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span>/httpdocs /var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span>/httpdocs.old</strong></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#000000;">Now we can create a link redirecting visitors to our rails app instead of httpdocs. <strong>ln -s /var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span>/rails/<span style="color:#ff0000;">yourappname</span>/public /var/www/vhosts/<span style="color:#ff0000;">yourdomain.com</span>/httpdocs</strong></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#000000;">Run this command to update the server to let it know about our VHost file we created earlier <strong>/usr/local/psa/admin/sbin/websrvmng -a</strong></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#000000;">Restart apache <strong>service httpd restart</strong></span></span></li>
<li><span style="color:#ff0000;"><span style="color:#000000;">Your done! You can upload changed files to your website at that rails/yourappname directory. Hope that helps anyone stuck.</span></span></li>
</ol>
<p>Thanks for reading hope it was helpful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/greggoodwin.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/greggoodwin.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/greggoodwin.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/greggoodwin.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/greggoodwin.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/greggoodwin.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/greggoodwin.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/greggoodwin.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/greggoodwin.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/greggoodwin.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/greggoodwin.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/greggoodwin.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/greggoodwin.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/greggoodwin.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=greggoodwin.wordpress.com&amp;blog=4182578&amp;post=11&amp;subd=greggoodwin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://greggoodwin.wordpress.com/2009/03/01/install-ruby-on-rails-with-passenger-on-mediatemple-dv-35-how-to/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd70db84c6ac488415abbd1c53e7b10c?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">greggoodwin</media:title>
		</media:content>

		<media:content url="http://greggoodwin.files.wordpress.com/2009/03/railsmt.png" medium="image">
			<media:title type="html">railsmt</media:title>
		</media:content>
	</item>
	</channel>
</rss>
