Day 1: The workspace
My work setup
On day 0, I installed ROR on my development system (my trusty Sony VAIO PCG-V505EX), running Ubuntu Feisty Fawn with Apache on port 80 and Mongrel on port 3000. For my IDE, I’m trying out Aptana +RDT and good old emacs with a ruby mode.
I started reading “Why’s Poignant guide to Ruby” last night but found myself skipping over too much content — it’s cute and I’ll keep scanning it, but the Ruby API is better suited for my schedule (Rails API too). I’ll undoubtedly reference it enough in the future to start getting used to it.
Also started browsing the Basecamp API forums and downloaded the 37 signals Ruby Wrapper. Looking for a guide for my initial challenges, I found Beyond the Type’s BC / ROR tutorial.
First snag
Attempting to launch script/console gave me the following error:
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/console.rb:25:in `exec': No such file or directory - irb -r irb/completion -r script/../config/../config/environment -r console_app -r console_with_helpers --simple-prompt (Errno::ENOENT)
Gross! It turns out that irb was not installed on my system (“No such file or directory – irb”) and a quick apt-get install irb fixed this.
Second snag:
After installing irb and including the basecamp library, I get
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- net/https (MissingSourceFile)
This is a little bit disconcerting — HTTPS is something I expect to be included alongside HTTP, but maybe ROR or Ubuntu is weird like that. A stab in the dark “sudo gem install net-https” didn’t work (no such gem), so I googled until I found a Spanish-speaking gentleman who encountered and solved this problem. Lo and Behold, the same fix worked for me.
Third Snag:
Script/console now starts, but I get WARNINGs about redefining a bunch of constants.
/usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.11/lib/xmlsimple.rb:275: warning: already initialized constant KNOWN_OPTIONS
/usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.11/lib/xmlsimple.rb:280: warning: already initialized constant DEF_KEY_ATTRIBUTES
I’ll take this warning to heart, since we’ll be transforming XML data into objects all day long and something is definitely amiss here. Again, this turns out to be a solved problem. Thanks, community!
“Are you using a gem such as ‘flickr’? Well, the reason you’re getting these warnings is that Ruby on Rails includes its own copy of the XmlSimple library. But XmlSimple is also available as a Ruby Gem, and the flickr gem depends on it. Ruby tries to avoid loading the same library twice, but it does this based on the file name. Problem is, the gem’s file is “xmlsimple.rb” but the Ruby on Rails’ file is “xml_simple.rb”. Bogus.”
Sure enough, at the top of basecamp.rb I find:
begin
require 'xmlsimple'
rescue LoadError
begin
require 'rubygems'
require_gem 'xml-simple'
rescue LoadError
abort <<-ERROR
The 'xml-simple' library could not be loaded. If you have RubyGems installed
you can install xml-simple by doing "gem install xml-simple".
ERROR
end
end
Changing this to the following took care of the double-loading:
begin
require 'rubygems'
gem 'xml-simple'
rescue LoadError
abort <<-ERROR
The 'xml-simple' library could not be loaded. If you have RubyGems installed
you can install xml-simple by doing "gem install xml-simple".
ERROR
end
Voila! Now I have a ROR environment, and a ruby interface to basecamp, all in time for lunch.

Had same problem, and looks like just installing xml-simple, as suggested in the above comment fields, does the trick and I don’t have to mod any gems, (at least whichever gem was giving me the problem).
Hi Philipp,
I was wondering if you can share the code for getting all the projects from an account? i have to list all the projects and to write them in a text file. any help is appreciated.
thanks