27.02.2013 Views

Rails%203%20In%20Action

Rails%203%20In%20Action

Rails%203%20In%20Action

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RVM and Ruby<br />

used to deploy your application because you’re hosting it on GitHub. Finally, curl<br />

allows you to connect to a URL and download its content. You’ll use this last package<br />

to install RVM.<br />

To install these packages, run this command:<br />

sudo aptitude -y install build-essential git-core curl<br />

The sudo part of this command tells Ubuntu to run a command as a super-user (root).<br />

14.2 RVM and Ruby<br />

You could install Ruby by downloading the package manually, extracting it, and then<br />

running the necessary commands yourself, but that’s boring. You could also install it<br />

using the package manager that comes with Ubuntu, but the Ruby that it provides is<br />

old and has been known to be broken.<br />

Wouldn’t it be nice if there was a tool that would install Ruby for you? There is! It’s<br />

called RVM!<br />

14.2.1 Installing RVM<br />

RVM provides several benefits over a standard Ruby compile, such as the ability to easily<br />

install and upgrade your Ruby install using commands like rvm install 1.9.2 to<br />

install Ruby 1.9.2. No digging for links on the http://ruby-lang.org site for you, no<br />

siree.<br />

There are a couple of ways you can install RVM. The first is a user-based install,<br />

installing it in an .rvm directory within the user’s own directory. But you’re going to<br />

want to access gems at a system-level later on in this chapter, so it’s best to install RVM<br />

at a system level. 14 To do this, run this command:<br />

sudo bash <

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!