Fork me on GitHub

Gem vs Erin

by Erin Holmes

14 Oct 2013

This is a pretty long post so for those that don’t want to read the whole thing, here’s a summary of what I had to say to RubyGems: “I don’t want to talk to you no more, you empty headed animal food trough wiper. I fart in your general direction. Your mother was a hamster and your father smelt of elderberries.” But after I got Jekyll installed and pushed my first commit, it was more like: “Please! This is supposed to be a happy occasion. Let’s not bicker and argue over who killed who.”

Background: About five weeks ago, I performed my first commit using the git command line. The process was relatively painless since someone was kind enough to hold my hand throughout the process. I didn’t necessarily understand what I was doing at the time, but I was successful at it. However, one part that was missing five weeks ago was a local installation of Jekyll. I simply made the changes, performed a commit, and pushed it to github.com.

Present day: So now I finally have a chance to preview my work locally! I approached this assignment with an open mind and excitement because this seems like a great idea! So here we go:

Step 1: Installing Ruby? check. All systems go!

Step 2: Installing Github-Pages? Egad! An error! That’s cool, we have a contingency plan.

Step 2a: Installing Jekyll by itself? Another error!

What error you ask? The one below and I’m pretty sure this isn’t even in English!

erinh@erinh-VirtualBox:~$ sudo gem install jekyll
ERROR:  Could not find a valid gem 'jekyll' (>= 0) in any repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)

When there’s something strange in your RubyGems, who you gonna call? Google! Most of the sites I looked at agreed that this was probably a network-related error, but each site listed a different way of fixing it. So I tried restarting my Ubuntu internet connection. You know the Family Feud buzzer sound and big red X that appears when people get an answer wrong? Well that’s what I saw and heard in my head when that didn’t work.

So, on my next go-round, I tried to download the gem from the RubyGems website and install it manually. And I would've gotten away with it too - had it not been for those meddling dependencies!

erinh@erinh-VirtualBox:~/Downloads$ sudo gem install jekyll
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: jekyll requires liquid (~> 2.5.2), classifier (~> 1.3), directory_watcher 
(~> 1.4.1), maruku (~> 0.5), pygments.rb (~> 0.5.0), commander (~> 4.1.3), safe_yaml (~> 0.7.0), colorato

BUZZ! Strike 2! So along comes a site that explains it may be something wrong with the source with a link to documentation about the different sources available. (http://guides.rubygems.org/command-reference/#gem_sources) I changed the source to use an SSL connection by adding https://rubygems.org and removing http://rubygems.org/

erinh@erinh-VirtualBox:~/Downloads$ gem sources --add https://rubygems.org
https://rubygems.org added to sources
erinh@erinh-VirtualBox:~/Downloads$ gem sources --remove http://rubygems.org/
http://rubygems.org/ removed from sources.

And finally success! Well, kind of. After changing my source, I performed sudo gem install jekyll first and it worked fine. However, sudo gem install github-pages gave dependency errors because the versions of some of the gems were still were wrong. So I did a gem list command and installed the particular versions that github-pages by doing the following: $ sudo gem install liquid -v 2.5.1

The better way probably would’ve been to remove jekyll and then install github-pages from scratch, which I think would have given me all the correct dependencies I needed, but by the time I got to this point, I was out of patience for RubyGems. After all, I’m still only on Step 2 of the master plan at this point.

Once I got that working, Jekyll and Git worked like they were supposed to. I was able to commit, preview locally and push from the command line with no issues. As for a screenshot? Ain’t nobody got time for that! sorry

Erin is a second year MSIS student and is trying her best at life! She hopes to be a git rockstar in about 3 months! Find Erin Holmes on Twitter, Github, and on the web.
comments powered by Disqus