Install Ruby on Rails 3.2 With RVM
|Things that might matter
||MacOS X Snow Leopard
I just installed Ruby on Rails on my Mac and thought I’d share the quick details.
- 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)
- Reload the environment:
- 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):
- 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:
- Assuming that went according to plan we’ll want to now tell RVM to use this version of Ruby.
- 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
- Next we set RVM to use Ruby 1.9.3 with our empty ‘rails32′ gemset.
- We can now install the lastest version of Rails into this ‘profile’ with the following command:
- Check it out using the commands
ruby -v and then
…aaaannnnd Bob’s your uncle. Goodnight.
Understanding how a programming language works is a surefire way to be a better developer. Read more.
Leave a Reply