<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>忍 者  .   大 衛</title>
  <link href="http://blog.davetheninja.net/atom.xml" rel="self"/>
  <link href="http://blog.davetheninja.net/"/>
  <updated>2011-12-31T18:49:04+08:00</updated>
  <id>http://blog.davetheninja.net/</id>
  <author>
    <name>Dave the Ninja</name>
    
  </author>

  
  <entry>
    <title>RVM: Ruby Heaven</title>
    <link href="http://blog.davetheninja.net/articles/2011/01/12/rvm-ruby-heaven/"/>
    <updated>2011-01-12T08:04:00+08:00</updated>
    <id>http://blog.davetheninja.net/articles/2011/01/12/rvm-ruby-heaven</id>
    <content type="html">&lt;p&gt;When I first started programming in Ruby I was stuck between a rock and a hard place using Ruby 1.8 and  trying to manage different versions of Rails and Gems - to even consider trying Ruby 1.9 terrified me with the fear of FAIL and of having to re-install everything.&lt;/p&gt;

&lt;p&gt;This fear undoubtedly stems from my years as a .NET developer using OSS libraries and suffering the pain of upgrading my development stack.&lt;/p&gt;

&lt;p&gt;It wasn’t until Nick Ricketts (&lt;a href=&quot;http://www.twitter.com/nightshade427/&quot; title=&quot;nightshade427&quot;&gt;@nightshade427&lt;/a&gt;) and John Polling (&lt;a href=&quot;http://www.twitter.com/@pollingj/&quot; title=&quot;pollingj&quot;&gt;@pollingj&lt;/a&gt;) pointed me in the direction of RVM that all my worries disappeared in an instant.&lt;/p&gt;

&lt;p&gt;RVM was created by Wayne E. Seguin and the introduction on the website explains that&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;RVM is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems.&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;Basically RVM allows you to have self contained instances of Ruby running on your machine (or server) and gives you the ability to seamlessly switch between them - but that’s not the best part.&lt;/p&gt;

&lt;p&gt;The best part is that you can setup self contained gemsets PER RUBY VERSION PER PROJECT!&lt;/p&gt;

&lt;p&gt;That’s right kids, no more installing global gems for each Ruby install, you can create gemsets per project.  You can even have multiple gem sets per project which allows you to easily change gems depending on what version/branch/fork of your project you are working on.&lt;/p&gt;

&lt;p&gt;I think the RVM website says it best&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;RVM has an extremely flexible gem management system called Gem Sets. RVM&amp;#8217;s gems(ets) make managing gems across multiple versions of ruby a non issue.&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;The geniuses at RVM have thought of everything, they even give you something called a “.rvmrc” file. You put this little beauty in the root of your project directory structure and any time you go into the folder RVM will automatically switch Ruby version AND activate the correct gemset for your project.&lt;/p&gt;

&lt;p&gt;At its most basic form, the contents of the .rvmrc would look like “rvm 1.8.7@myproject”. 1.8.7 being the version of Ruby and myproject being your projects gem set.&lt;/p&gt;

&lt;p&gt;I hope you go and check this project out as it will save you so much time and effort when doing Ruby development.&lt;/p&gt;

&lt;p&gt;You can find the RVM project at &lt;a href=&quot;http://rvm.beginrescueend.com&quot; title=&quot;http://rvm.beginrescueend.com&quot;&gt;http://rvm.beginrescueend.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will have a few follow up posts coming soon on RVM covering installation, work-flows and server installs.&lt;/p&gt;

&lt;p&gt;Ninja&lt;/p&gt;
</content>
  </entry>
  
</feed>

