Many of you that know me, know that I have signifigantly more experiance with systems then I do programming languages. The extent of my programming languages is usually limited to systems related programing at the shell with Bash, Perl, etc. Over the past few years, I have been interacting more with Ruby, both as a web development language and systems scripts with the use of Opscode Chef.
For those that don’t know what RVM is, it is the Ruby Version Manager. After interacting with Ruby, you will inevitably find yourself gravitating to it so you do not comprimise the systems version of Ruby. I like how RVM lets you setup custom gemsets and run multipe versions of Ruby all within the user space. I find this most usefull when experimenting with newer features and testing various gem packages.
So, know to the reason for this post. I have found it extremly frustrating getting the right enviornment setup across all my systems with the recent OS upgrades and various versions of Xcode, so I decided to share my proven method. This is a dead simple guide on how to get a pristine ruby enviornment running flawlessly on a clean install of OS X Lion.
You actually might be able to get away with this however there are just a few ruby applications that I have that are compiled with specific Xcode tools. I find it easier to just install it and all its features even though I do not work with Xcode very often.
OS GCC Compiler
OSX GCC Compiler is the most important and that contains all the necesary compilers that eliminate the need to install Xcode if you need a basic GCC compiler. Simply download and install. I also find it necesary to add this to your bash_profile in order for your code to use the right C compiler.
What would my life be without Homebrew. Well, honestly no different but i find it invaluable replacement of MacPorts and is probably the most up to date collection of Unix/Linux/BSD tools for the Mac platform. Now, you can get away from using this but I highly recomend it. If you ever find yourself needing the lastest NMAP, simply run
Ruby Version Manager
Ruby Version Manager or RVM is a dead simple way to work with Ruby on all nix or BSD based systems. The install is very straight forward and can be completed in just a few steps on the command line.
For more information on how to install RVM, check out my earlier post titled How to Install RVM
There you have it. With these sets of tools, you can plot to take over the world or build the next great internet startup.