seri/gettc

Installing gettc in macbook air

Closed this issue · 4 comments

My old laptop was dead, and I got a macbook air, which installs ruby and rubygems by default (version 1.8.7). I installed xcode command line tool which includes gcc-4.2. I downloaded the source of gettc using git and then typed "sudo rake", and got the following errors:

....
WARNING: no rubyforge_project specified
gettc requires hpricot (>= 0, runtime)

I then typed "gettc", the bash complained "command not found". Could you give me a hint about what had happened? Thanks!

Sorry, I found such problems can be solved by typing "sudo gem install hpricot" and "sudo gem install blueclot". Then I install gettc using "sudo rake". It then says "Successfully installed. Run gettc to get started". However, when I type "gettc 1442", it complains that

$ gettc 1442
/usr/bin/gettc:3:in `require': no such file to load -- topcoder (LoadError)
from /usr/bin/gettc:3

After chaging the line

require 'topcoder'

in /usr/bin/gettc to

require "rubygems"
require "topcoder"

The error was gone. Now I have a new error:
$ gettc 11222
You have given ID = 11222
undefined method `exists?' for Dir:Class

I've finally get it working. It turns out that I need ruby>=1.9. The detailed instructions for installing gettc on mac can be found at http://mytechmemo.blogspot.com/2012/03/install-gettc-on-macbook.html.

seri commented

I've been busy the last couple days. Yes you'll need hpricot, bluecloth, and ruby>=1.9. Glad it's working fine now!