Skip to main content

Installing RVM on Linux Mint 13

Linux Mint has captured my imagination recently, and of course a fresh install means getting my dev environment up and running again. I'm using the cinnamon version and so far things are going well. Everything on my laptop is just working; suspend, all the various function keys. Support out of the box is good. I'm impressed. The experience is soooo much better than the last time I tried a more full featured distro and things got so bad with video drivers crashing and causing my fan to spin up constantly that I ended up going totally minimal with Arch and just a command line. I like arch, but I thought I would give Mint a go. So, now we need to get Ruby, RVM and Rails on the go so we can do some web development. Let's start with RVM. Next time I'll take a crack at installing Rails on Mint First things first - we need curl. My install didn't have it up the terminal with Ctrl-Alt-T and type the following
sudo apt-get install curl
Next up, install RVM
curl -L | bash -s stable --ruby 
Which all went pretty well. At the end of the install, simply running
source ~/.rvm/scripts/rvm 
in my open terminal session brought everything up to snuff. Now I'm going to install a few dependencies
rvm requirements 
to check what you need on your system. Mine needed the following command to get up to speed.
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 \
libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison  \
And annoyingly I had to
rvm reinstall 1.9.3
because it was already installed but without doing the reinstall all sorts of nasty errors would occur when trying to install gems later on. Next a quick verification:
which ruby
>> /home/rubyflewtoo/.rvm/bin/ruby

ruby -v
>>ruby 1.9.3p194
I didn't have a system ruby installed given my version of Linux Mint was fresh off the boat, but if you did and you want to default to ruby 1.9.3 (which you should) then you could run
rvm use 1.9.3 --default


  1. Wow man, this tutorial is amazing. I'm halfway through it, but i will be honest this is the farthest i have ever gotten trying install ruby and next rails. I freaking love you.


Post a Comment

Popular posts from this blog

Getting started with Ruby on Rails 3.2 and MiniTest - a Tutorial

For fun, I thought I would start a new Ruby on Rails project and use MiniTest instead of Test::Unit. Why? Well MiniTest is Ruby 1.9s testing framework dejour, and I suspect we will see more and more new projects adopt it. It has a built in mocking framework and RSpec like contextual syntax. You can probably get away with fewer gems in your Gemfile because of that.Getting started is always the hardest part - let's jump in with a new rails project rails new tddforme --skip-test-unit Standard stuff. MiniTest sits nicely next to Test::Unit, so you can leave it in if you prefer. I've left it out just to keep things neat and tidy for now. Now we update the old Gemfile: group :development, :test do gem "minitest" end and of course, bundle it all up.....from the command line: $ bundle Note that if you start experiencing strange errors when we get in to the generators later on, make sure you read about rails not finding a JavaScript runtime. Fire up your rails server…

Add css class to your label form helpers

Say, for example, you are using Twitter Bootstrap to style up a quick rails app and you want to throw in a label tag with the class set to "control-label" just like the bootstrap guys do you do it? And more importantly, since you don't want to specify the text of the label, how do you accomplish that? Fear not intrepid young but soon to be rails guru, behold the truth:

Overriding equality and Test Driven Development

Ruby has, at its root, an Object. Methods available in Object are available to every class because every class in Ruby inherits from Object somewhere in its own class hierarchy. Of course, you can override methods in subclasses, changing the functionality of a root method.You might stumble on to this idea if you work through Test Driven Development By Example by Kent Beck, translating the Java code into Ruby as you go. At some point pretty early on, he overrides the equality method on the Currency class to better test if two instances are equal. I'm going to do the same here, working with Instruments instead of Currency.EqualityEquality in Ruby can be expressed using any of the following three methods object == other equal?(other) eql?(other) These methods are defined on the base Object. The default implementation of equality will only return true if both objects are exactly the same. The interesting thing is that although these three methods start out functioning the same, the do…