Assignment 4: RPG
ProblemsPage 1 of 7

1. Installing Gems

For this assignment, you will need to have your own machine running Ruby. If you haven't done so, please take a look at this page in assignment 2. This is because you do not have privilege to install additional things to cluster computers.

If nothing works, please email shu AT!

Installing Gems

Ruby allows you to install plugins (or libraries) from command line. They are called gems.

Twitter Gem

There is a twitter gem (library) for Ruby. Please download it by doing (add sudo for macs/linux):

gem install twitter

Windows Users: If you used one click installer to install Ruby, please do gem update --system before executing the above command.

(Also, you might need an administrator privilege on Windows Vista - simply right click Command Prompt and select Run as Administrator)

Linux Users: You need to install gem before you use ruby. Here is the instruction.

Mac Users: First, try doing sudo gem update --system. If you get the error:

Building native extensions. This could take a while...
ERROR: Error installing twitter:
ERROR: Failed to build gem native extension.

You might have to install XCode according to this article. To get XCode, you go here and create ADC membership. XCode is a great software as it lets you code Mac OS X apps (and iPhone apps), so you probably should install it anyway.

Hopefully above works. If that fails, please email me.

If you got above error with Linux, try:

sudo apt-get install ruby1.8-dev

Failed to install?

First, please Google the error for at least 15 minutes because I don't know how to solve this problem either :) Then, you can either email shu AT OR skip page 2, 3, 4 and go directly to page 5..

You will still need to read pages 2, 3, and 4 to understand what is going on. Then you can download rpg_word_to_count.txt and fb_word_to_count.txt for pages 5 and on.

Next Page

Next Page

Assignment 4: