Installing Rails with RVM support on Ubuntu 12.04/12.10 or Linux Mint 14

Here’s a link to a really complete post on preparing your Ubuntu machine for Rails development:

http://railsapps.github.io/installrubyonrails-ubuntu.html

The above link by the awesome Daniel Kehoe should be all you need to get Rails running on your Ubuntu machine, but I’ve left the information below as a record of how I previously prepared my Ubuntu machines for Rails development. As of 2013-03-18, these instructions also worked well on a new Linux Mint 14 install box (which is based on Ubuntu 12.10).

I mostly followed this guide “Installing Ruby on Rails on Ubuntu 12.04from The Tech Journal, which worked very well, except for the RVM instructions did not work for me.

Since I had a trouble installing RVM per the instructions in the above post, I followed the basic install instructions directly from the full RVM site:

https://rvm.io/rvm/install/

Install RVM/Ruby dependencies

Next, from the terminal window, type:

RVM will show you a list of dependencies that need to be installed. So, run the sudo apt-get commands shown (copy and paste them in the terminal window) to prepare the environment for rvm, ruby, rails development.

Install a version of Ruby:

I can’t tell you which version(s) you’ll want or need, but this how you will install them.
You can get a list of available versions with this command:

You’re on you on from here…

Create a RVM gemset, then install your desired Rails version and any other gems your app needs. You’ll probably use the “bundle” command to pull in the required gems from a gemfile. From here on, it’s basic Rails stuff.

Other crap I’ve had to deal with if something goes wrong….

http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395

Oh, yeah, one more final point about (not) installing gem docs…

I always like to turn off the documentation downloads (rdoc and ri) when installing new gems (I never read the docs locally this way, I always use the web). You can make a permanent change on your system to *not* install gem documentation when installing new gems. Run this line in the terminal window:

This will create a .gemrc file in your home folder telling the gem installer not to download the docs when you install new gems. You only need to do this once.

Do this before you run any “gem install” commands, or use Bundler, so that it won’t waste time and space pulling down docs for the gems.

Other detailed instructions for installing a full Ruby, Rails, Apache, MySql stack

If you really want a LOOONG tutorial that also gets deep into installing Apahce, MySql, and all that jazz, check out this post which has a 35 page PDF mega walk-through.

Setting up RubyMine

If you want to install RubyMine IDE for your Rails development, you can follow my instructions here: http://mattslay.com/installing-rubymine-4-on-ubuntu-12-04/

Other goodies I installed on my new Ubuntu machine:

I installed these personal favorites right from the Ubuntu Software Center  (I’ve listed links so you can learn more about these tools, but I recommend installing them through the Ubuntu Software Center right inside of Ubuntu):

If you’ve got favorite Linux/Ubuntu tools that you think are helpful to Rails developers, please add them in the comments.

7 thoughts on “Installing Rails with RVM support on Ubuntu 12.04/12.10 or Linux Mint 14”

  1. I’ve never used Konsole or Krusader… what’s better about them? Maybe that’s a scope for another blog post.

  2. I followed your blog to install rvm on a fresh Ubuntu 12.04 VirtualBox installation. I found that the commands in the “Second Change” section were necessary as well as the chown command in the “Finally” section.

    Great info, thanks for posting!

  3. chown ( change owner ) with parameter -R (recursive), is used to change owner of the folder .rvm and all it content.

  4. I like konsole as well. You can just hit the button to open a new terminal, with buttons or tabs at the bottom to quickly switch to a different terminal. You can double-click the buttons/tabs and give them meaningful names. For example, for Rails, I’ll have one that says “models” that has vim with a couple model files open, and others for “controllers”, “helpers”, etc. Then I’ll have one that says “db”, which I’ll have a tmux session with windows panes for various databases.

Leave a Reply to Matt Slay Cancel reply

Your email address will not be published. Required fields are marked *