,

The Devil in Ruby — Installing Gems

I traveled to Chicago last Thursday to meet up with Mike for some pairing, as well as attending 8th Light University on Friday. We were going to use my laptop for the pairing when Mike discovered a problem with my Ruby install. The gems hadn’t fully installed. While my computer re-installed everything, we used Mike’s…


I traveled to Chicago last Thursday to meet up with Mike for some pairing, as well as attending 8th Light University on Friday.

We were going to use my laptop for the pairing when Mike discovered a problem with my Ruby install. The gems hadn’t fully installed. While my computer re-installed everything, we used Mike’s computer to build a coin changer program. Once we got rolling, my brain finally started wrapping around the syntax of Ruby and all it has to offer.

My computer and rvm weren’t so lucky.

The install of rubygems failed again.

It continued to do so even after I completely removed rvm and started from the very beginning several times. (Side note: I find it hilarious that to uninstall rvm the command is ‘rvm implode’!) I did some googling around trying to find different uninstall and reinstall options for rvm, ruby and gems to work my way around the issue.

One of the biggest problems I had while searching this error was that when I search the error in its entirety nothing shows up.

This error has been the bane of my existence for the last 18 hours or so:

There is no checksum for ‘http://production.cf.rubygems.org/rubygems/rubygems-2.1.8.tgz’ or ‘rubygems-2.1.8.tgz’, it’s not possible to validate it.
This could be because your RVM install’s list of versions is out of date. You may want to
update your list of rubies by running ‘rvm get stable’ and try again.
If that does not resolve the issue and you wish to continue with unverified download
add ‘–verify-downloads 1’ after the command.
There has been an error while trying to fetch rubygems.
Halting the installation.

Eventually I used the information found here and here to get around the issue. I tried several of the options at both places to no avail, but when I did the steps from the two combined, I had success!

So, first, you’re going to want to start over.

  1. Remove rvm and ruby.
    • Run one at a time:
      • rvm remove ruby
      • rvm implode
  2. Re-install ruby and rvm (towards the end of the command running it will prompt you for your admin password)
    • curl -L https://get.rvm.io | bash -s stable –ruby
  3. Reload rvm (if you try and skip this step the terminal will make you do it anyway, so just do it.)
    • rvm reload
  4. Install another (failing at gems install) run of 1.9.3
    • rvm install 1.9.3
  5. Run a fix to install the gems
    • rvm get head && rvm-smile
  6. Install the latest gems
    • rvm rubygems latest

At this point is where you should use ‘gem list’ to see that it (and any other gems you’ve installed) are there. I did not use this command, which caused me to freak out because I thought I was getting the same error as above, and that did not make me happy. I spent the weekend diving into a rabbit hole that didn’t exist.

You code, you learn.

I’m glad (although a little pissed) that it was user error and my steps above worked!

How was your weekend?


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts