microtuts

Install Ruby on Rails 3.2 With RVM

Things that might matter
Ruby: 1.9.3
Rails: 3.2
OS: MacOS X Snow Leopard

I just installed Ruby on Rails on my Mac and thought I’d share the quick details.

  1. Open up the terminal.  First we’re going it install RVM (Ruby Version Manager).  This is a safer way to install Rails.  Basically it allows us to manage different sets of Ruby on Rails versions (like having multiple versions of .NET).   Enter this in the terminal:
    bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
  2. Reload the environment:
    source ~/.bash_profile
  3. Enter this command to see if there’s any additional requirements (read the response through… I didn’t need to do anything but you might):
    rvm requirements
  4. Now that we have RVM running we’ll use it to install the latest version of Ruby.  Rails 3.2 recommends version 1.9.3.   You can see a list of available versions/flavors using the rvm list known command.  To install 1.9.3 type this command:
    rvm install 1.9.3
  5. Assuming that went according to plan we’ll want to now tell RVM to use this version of Ruby.
    rvm use 1.9.3 --default
  6. Now we need to create a gemset.  As far as I understand a gemset is like an RVM “profile”.  It wraps a Ruby version with a Rails version and encapsulates any gems involved as well.  We’ll create a gemset called “rails32″ (you can call it what you like).  People recommend having a gemset per rails project.rvm gemset create rails32
  7. Next we set RVM to use Ruby 1.9.3 with our empty ‘rails32′ gemset.
    rvm use [email protected] --default
  8. We can now install the lastest version of Rails into this ‘profile’ with the following command:
    gem install rails
  9. Check it out using the commands ruby -v and then rails -v

 

…aaaannnnd Bob’s your uncle.  Goodnight.


Creating your first programming language is easier than you think.

Understanding how a programming language works is a surefire way to be a better developer. Read more.


Suggested Reading


written by Ryan Bosinger
Ryan is a web developer living and working in Banff Alberta. He also writes for giftsforpeoplewitheverything.com and freefoley.com.

Leave a Reply