<?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/"
	>

<channel>
	<title>Sean&#039;s Blog &#187; environment</title>
	<atom:link href="http://seanbehan.com/tag/environment/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Installing and Using Rvm on Mac OS X, Creating Gemsets and Reverting to Original Environment</title>
		<link>http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/</link>
		<comments>http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 17:35:23 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[mac os x]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[rvm]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[version management]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1187</guid>
		<description><![CDATA[What is RVM and why should you use it? RVM is a Ruby interpreter, version management tool. In short, it enables you to switch between different versions and releases of Ruby (for instance, version 1.8.6, 1.8.7, jruby 1.9.2, ruby enterprise edition) on the same machine, while associating different gems with each version of the ruby [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fmac-os-x%2Finstalling-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Installing and Using Rvm on Mac OS X, Creating Gemsets and Reverting to Original Environment" data-url="http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>What is RVM and why should you use it? RVM is a Ruby interpreter, version management tool. In short, it enables you to switch between different versions and releases of Ruby (for instance, version 1.8.6, 1.8.7, jruby 1.9.2, ruby enterprise edition) on the same machine, while associating different gems with each version of the ruby interpreter. This is super useful and awesome. If you want to play with Rails 3 and Ruby 1.9.1, for 5 minutes, and then want to switch back to your production apps, which are running on Rails 2.3.5 and Ruby 1.8.7, you can do so with a single command from the terminal. With RVM this is a fairly simple process so there is no reason not to install it. You can also revert back to your system settings (not using RVM) with a single command. After all Rails is just a gem, so you can easily create and manage different RVM &#8220;gemsets&#8221;, (sets of different gems), for the different versions of Ruby (rubies as RVM refers to them) you have installed.      </p>
<p>Installing RVM  </p>
<pre class="wp-code-highlight prettyprint">
bash &lt; &lt;(curl -s https://rvm.beginrescueend.com/install/rvm)
</pre>
<p>Next you have to add rvm to your bash profile</p>
<pre class="wp-code-highlight prettyprint">
# place in ~/.bash_profile as the very last line
[[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;&amp; . &quot;$HOME/.rvm/scripts/rvm&quot;
</pre>
<p>To check everything went well</p>
<pre class="wp-code-highlight prettyprint">
type rvm | head -n1
</pre>
<p>Should tell you &#8220;rvm is a function&#8221; </p>
<p>How to add ruby, pass it the version to install </p>
<pre class="wp-code-highlight prettyprint">
rvm install 1.8.7
</pre>
<p>*The current terminal session will load this environment. New sessions will not. To use a version of ruby and set it as the default, pass it the &#8211;default option</p>
<pre class="wp-code-highlight prettyprint">
rvm use 1.8.7 --default
</pre>
<p>Next create a gemset, which will make available different gems for different versions</p>
<pre class="wp-code-highlight prettyprint">
rvm gemset create rails_2_3_5
</pre>
<p>When you run &#8220;gem list&#8221;, you should see nothing!</p>
<pre class="wp-code-highlight prettyprint">
gem install rails -v=2.3.5
</pre>
<p>Set a default rvm and default gemset, specify which gemset with the @ sign and include the &#8211;default option</p>
<pre class="wp-code-highlight prettyprint">
rvm use 1.8.7@rails_2_3_5 --default
</pre>
<pre class="wp-code-highlight prettyprint">
which gem
gem list
ruby --version
rails --version
</pre>
<p>And to get back to where you started and revert to using your original ruby setup </p>
<pre class="wp-code-highlight prettyprint">
rvm system
</pre>
<p>For upgrading your version of RVM check out this post I wrote <a href="http://seanbehan.com/ruby/how-to-upgrade-rvm-on-mac-os-x/">http://seanbehan.com/ruby/how-to-upgrade-rvm-on-mac-os-x/</a></p>
<p>Finally, you can create a .rvmrc file and put it in any directory and when you cd into that directory the environment specified in the file will be loaded automatically. This way you don&#8217;t have to remember the version and gemsets and type them into the console. All you have to do is put the ruby version and gemset name in the file like so</p>
<pre class="wp-code-highlight prettyprint">ruby1.8.7@rails2.3.5</pre>
<p>You&#8217;ll be prompted to trust the .rvmrc file the first time, type &#8220;y&#8221; for yes. Also, subdirectories will inherit this .rvmrc so you can just put it in the parent directory like</p>
<pre class="wp-code-highlight prettyprint">
rails2/
     .rvmrc
     app1
     app2
rails3/
     .rvmrc
     app1
     app2
</pre>
<p>And both app1 and app2 will use the .rvmrc environment while your rails3 directory apps will load the environment in its directory!</p>
<p>More information available here:<br />
<a href="http://rvm.beginrescueend.com/rvm/install/">http://rvm.beginrescueend.com/rvm/install/</a><br />
<a href="http://www.stjhimy.com/posts/4">http://www.stjhimy.com/posts/4</a><br />
<a href="http://eddorre.com/posts/installing-rails-3-beta-4-using-rvm">http://eddorre.com/posts/installing-rails-3-beta-4-using-rvm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Installing Scala on Mac OS X Leopard</title>
		<link>http://seanbehan.com/programming/installing-scala-on-mac-os-x-leopard/</link>
		<comments>http://seanbehan.com/programming/installing-scala-on-mac-os-x-leopard/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 03:52:01 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=543</guid>
		<description><![CDATA[I followed the instructions from here http://arvinderkang.com/2009/09/01/installing-scala-on-snow-leopard/ but I used version 2.7.6 (rather than .5) I installed scala under /usr/local/scala so I had to include it to my path. Type vim .bash_profile export PATH=&#34;/usr/local/bin:/usr/local/sbin:/usr/local/scala/scala-2.7.6.final/bin:$PATH&#34; Now to download and install&#8230; curl -O http://www.scala-lang.org/downloads/distrib/files/scala-2.7.6.final-installer.jar sudo java -jar scala-2.7.6.final-installer.jar This will launch an installer. Just follow the instructions [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fprogramming%2Finstalling-scala-on-mac-os-x-leopard%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Installing Scala on Mac OS X Leopard" data-url="http://seanbehan.com/programming/installing-scala-on-mac-os-x-leopard/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>I followed the instructions from here http://arvinderkang.com/2009/09/01/installing-scala-on-snow-leopard/ but I used version 2.7.6 (rather than .5) I installed scala under /usr/local/scala so I had to include it to my path. Type</p>
<pre class="wp-code-highlight prettyprint">
vim .bash_profile
export PATH=&quot;/usr/local/bin:/usr/local/sbin:/usr/local/scala/scala-2.7.6.final/bin:$PATH&quot;
</pre>
<p>Now to download and install&#8230;</p>
<pre class="wp-code-highlight prettyprint">
curl -O http://www.scala-lang.org/downloads/distrib/files/scala-2.7.6.final-installer.jar
sudo java -jar scala-2.7.6.final-installer.jar
</pre>
<p>This will launch an installer. Just follow the instructions and when it asks for the destination folder, remember that it&#8217;s in /usr/local/scala<br />
Simple as pie!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/installing-scala-on-mac-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Sphinx Search Engine on Mac OS X&#8230; or ld: library not found for -lmysqlclient</title>
		<link>http://seanbehan.com/programming/installing-sphinx-search-engine-on-mac-os-x-or-ld-library-not-found-for-lmysqlclient/</link>
		<comments>http://seanbehan.com/programming/installing-sphinx-search-engine-on-mac-os-x-or-ld-library-not-found-for-lmysqlclient/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 19:19:47 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=410</guid>
		<description><![CDATA[If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and therefore, it will spit out the error message because it can&#8217;t find the correct libraries. ld: library not found for -lmysqlclient There is a quick [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fprogramming%2Finstalling-sphinx-search-engine-on-mac-os-x-or-ld-library-not-found-for-lmysqlclient%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Installing Sphinx Search Engine on Mac OS X&#8230; or ld: library not found for -lmysqlclient" data-url="http://seanbehan.com/programming/installing-sphinx-search-engine-on-mac-os-x-or-ld-library-not-found-for-lmysqlclient/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and therefore, it will spit out the error message because it can&#8217;t find the correct libraries.</p>
<pre class="wp-code-highlight prettyprint">
 ld: library not found for -lmysqlclient
</pre>
<p>There is a quick solution to the problem -upgrade mysql! You&#8217;ll need Mac Ports installed, available at</p>
<p>http://macports.org/</p>
<p>Run the command</p>
<pre class="wp-code-highlight prettyprint">
sudo port install mysql5
</pre>
<p>This will not destroy any existing data from your previous MySQL installation. The mac port installation will take a while, and it will appear as if it is just hanging. It&#8217;s not. It just takes a while. I clocked it at 15 minutes on a relatively fast network connection. Drink a cappuccino!</p>
<p>After you have the upgrade you&#8217;ll need to download Sphinx available at:<br />
http://sphinxsearch.com/downloads.html (latest stable) and build the Sphinx engine from source like so:</p>
<pre class="wp-code-highlight prettyprint">
wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar xzvf sphinx-0.9.8.1.tar.gz
cd  sphinx-0.9.8.1/
./configure --with-mysql-libs=/opt/local/lib/mysql5/mysql/
--with-mysql-includes=/opt/local/include/mysql5/mysql/
make
sudo make install
</pre>
<p>Much thanks to this post b/c I spent forever trying to get the bundled version of MySQL linked properly:</p>
<p>http://www.fozworks.com/2008/9/5/rake-installation-of-sphinx-in-mac-osx</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/installing-sphinx-search-engine-on-mac-os-x-or-ld-library-not-found-for-lmysqlclient/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sending eMail with Rails on Mac OS X Development Environment</title>
		<link>http://seanbehan.com/programming/sending-email-with-rails-on-mac-os-x-development-environment/</link>
		<comments>http://seanbehan.com/programming/sending-email-with-rails-on-mac-os-x-development-environment/#comments</comments>
		<pubDate>Sun, 10 May 2009 19:45:34 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[sending mail]]></category>

		<guid isPermaLink="false">http://bseanvt.wordpress.com/?p=227</guid>
		<description><![CDATA[You&#8217;ll need a mail transport agent (MTA). I installed and used postfix using Mac Ports. sudo port install postfix You&#8217;ll need to start postfix, to send mail from your Rails application. You can set it as a startup item and it will start on boot. However, since I don&#8217;t send too much mail from my [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fprogramming%2Fsending-email-with-rails-on-mac-os-x-development-environment%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Sending eMail with Rails on Mac OS X Development Environment" data-url="http://seanbehan.com/programming/sending-email-with-rails-on-mac-os-x-development-environment/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>You&#8217;ll need a mail transport agent (MTA). I installed and used postfix using Mac Ports.</p>
<pre class="wp-code-highlight prettyprint">sudo port install postfix</pre>
<p>You&#8217;ll need to start postfix, to send mail from your Rails application. You can set it as a startup item and it will start on boot. However, since I don&#8217;t send too much mail from my Rails app, just for testing normally, I start it manually.</p>
<pre class="wp-code-highlight prettyprint">
sudo postfix start
</pre>
<p>That should do it!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/sending-email-with-rails-on-mac-os-x-development-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git</title>
		<link>http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/</link>
		<comments>http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 19:25:13 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://bseanvt.wordpress.com/?p=11</guid>
		<description><![CDATA[Here are a list of commands to get up and running with Apache2 with Phussion Passenger for Rails, PHP5, MySQL5, Ruby on Rails with Gems, and the source control software Git. I think that this is a pretty ideal environment for a development box and even production if you need to run apps that are [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Flinux%2Fnew-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git" data-url="http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Here are a list of commands to get up and running with Apache2 with Phussion Passenger for Rails, PHP5, MySQL5, Ruby on Rails with Gems, and the source control software Git. I think that this is a pretty ideal environment for a development box and even production if you need to run apps that are written in both PHP and Ruby.</p>
<p>I&#8217;m using Ubuntu 8, Hardy Heron in this example.</p>
<p>Login to your server as root, sudo su, if you&#8217;re on the box already as another user. You can optionally enter the sudo command before each of the following commands but I don&#8217;t in this example. If you get a permission denied error, try the same command again with sudo in front of it.</p>
<p>The following will update where Ubuntu looks for packages, upgrade to the latest stable build and also install build tools like gcc and make.</p>
<pre class="wp-code-highlight prettyprint">
apt-get update
apt-get upgrade
apt-get install build-essential
</pre>
<p>Now that the server is up to date and has the necessary tools to build and compile the software we&#8217;re about to install, let&#8217;s intstall our basic LAMP (Linux, Apache2, MySQL and PHP) stack. You can list different packages to install sequentialy if you separate them with a space.</p>
<pre class="wp-code-highlight prettyprint">
apt-get install apache2 apache2-prefork-dev
apt-get install mysql-client mysql-server
apt-get install php5 php5-mysql
</pre>
<p>Lets get Ruby installed next. We will want to use Ruby Gems to manage our Ruby packages rather than apt-get. The reason is because apt-get doesn&#8217;t keep up with the latest stable for all Ruby packages and Gems is really a great way to manage Ruby libraries. Think of Ruby Gems as apt-get but for Ruby. Rails for example is a Ruby library that we will download and install using Gems. However, to install Gems we need Ruby and we get Ruby using apt-get.</p>
<pre class="wp-code-highlight prettyprint">
apt-get install ruby ruby1.8-dev libopenssl-ruby ri rdoc
</pre>
<p>This should download and install Ruby with a couple of other packages for documentation and SSL support. To get Gems we need to download either a zip or tgz. The best way and easiest way is to navigate to http://rubyforge.org and search for rubygems(one word).</p>
<p>Here is a link to the exact package that I have downloaded and used for this information.</p>
<pre class="wp-code-highlight prettyprint">

http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
</pre>
<p>However, this could change in the future or when Gems gets an upgrade.</p>
<p>You need to get it on your server. You can either download it to your local machine and ftp or scp it to your remote server or you can use a tool like wget to download directly to your server.</p>
<pre class="wp-code-highlight prettyprint">
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
</pre>
<p>If you don&#8217;t have wget installed, which would be odd, just type apt-get install wget</p>
<p>After it has finished downloading unpack it and cd into it *the name below will be different .</p>
<pre class="wp-code-highlight prettyprint">
tar xzvf &amp;lt;rubygems-dowloaded-file.tgz&amp;gt;
</pre>
<p>After you cd into the folder type</p>
<pre class="wp-code-highlight prettyprint">
ruby setup.rb
</pre>
<p>You&#8217;ll install new Gems with the command gem install package-name. However, now you need to link the program you just downloaded to /usr/bin/gem. The reason is that Gems was installed but with a version number suffix like /usr/bin/gem1.8 or whatever version it&#8217;s at. The reason for this is so that you can switch between different versions of Gems without having to uninstall anything. Just override the old link and you can use the new Gem. So to link the file you&#8217;ll need to find the path that it was installed under, most likely /usr/bin/gem1.8. Once you have the path type in the terminal</p>
<pre class="wp-code-highlight prettyprint">
ln -s /usr/bin/&amp;lt;your gem version&amp;gt; /usr/bin/gem
</pre>
<p>Where &lt;your gem version&gt; is something like gem1.8</p>
<p>Type gem &#8211;version to verify that it works. You&#8217;ll get a readout of the version of the Gem you are using. Next let&#8217;s get it up to date and install the Rails framework. That is two dashes for the system flag below.</p>
<pre class="wp-code-highlight prettyprint">
gem update --system
gem install rails
</pre>
<p>Once that is done we&#8217;ll want to install Phusin Passenger which will let us deploy our Rails application in a similar fashion to any PHP based application. Just point a VirtualHost DocumentRoot to the location of your Rails_Root/public directory and your&#8217;re good to go!</p>
<pre class="wp-code-highlight prettyprint">
gem install passenger
</pre>
<p>Next we&#8217;ll build and compile the module for Apache. This is why we needed to run apt-get install build-essential, installing passenger requires make and gcc development tools. When you execute the next command it will spit a lot of stuff to the screen. This is normal, it is building and linking the module for you. When it is done it will tell you what to copy and paste. I will too, but your configuration could be slightly different. Just follow the prompts that follow.</p>
<pre class="wp-code-highlight prettyprint">
passenger-install-apache2-module
</pre>
<p>Passenger will tell you where to put the configuration options. It will look something like this</p>
<pre class="wp-code-highlight prettyprint">
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.5/ext/apa$
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.5
PassengerRuby /usr/bin/ruby1.8
</pre>
<p>I placed the code above into the /etc/apache2/mods-available/passenger.conf then I linked them to the mods available directory like so ln -s /etc/apache2/mods-available/passenger.conf /etc/apache2/sites-enables/passenger.conf</p>
<p>Next create a VirtualHost</p>
<pre class="wp-code-highlight prettyprint">
&amp;lt;VirtualHost *&amp;gt;
  ServerName awesome.iam.com
  DocumentRoot /var/www/awesome.iam.com/public
  RailsEnv production
&amp;lt;/VirtualHost&amp;gt;
</pre>
<p>Remember to restart your server with</p>
<pre class="wp-code-highlight prettyprint">
apache2ctl restart
</pre>
<p>Also, you restart your Rails application by issuing this command from the Rails_Root dir</p>
<pre class="wp-code-highlight prettyprint">
touch tmp/restart.txt
</pre>
<p>And finally, to install Git</p>
<pre class="wp-code-highlight prettyprint">
apt-get install git git-core
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/linux/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

