When installing Merb on my laptop, which runs Ubuntu Linux, I ran into a compiler error with hpricot, one of Merb’s dependencies. Before bothering to see what might be causing it, I checked to see if there was a precompiled apt-get package available. There was! I installed it and tried installing Merb again.

It still tried to install hpricot, however, and when I said to skip it, it said it could not install Merb because it was missing hpricot. I could have used force, or “pretty please”, but I wanted to instead tell the packaging system that I have hpricot installed.

I seem to remember a UNIX packaging system having an inject command — which tells the packaging system a program is already installed. I may have got the terminology wrong. I searched for such a command for rubygems but couldn’t find one. I did, however, find another way to convince rubygems that I already had hpricot.

I decided to do some digging in the gems directory. To find the gems directory, I typed:

ben@magicthise:~$ gem environment
RubyGems Environment:
  - VERSION: 0.9.4 (0.9.4)
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - GEM PATH:
     - /var/lib/gems/1.8
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
ben@magicthise:~$ cd /var/lib/gems/1.8/
ben@magicthise:/var/lib/gems/1.8$ ls
bin  cache  doc  gems  source_cache  specifications
ben@magicthise:/var/lib/gems/1.8$ cd specifications/
ben@magicthise:/var/lib/gems/1.8/specifications$ ls
abstract-1.0.0.gemspec          merb-cache-0.9.2.gemspec
actionmailer-2.0.2.gemspec      merb-core-0.9.2.gemspec
...
ben@magicthise:/var/lib/gems/1.8/specifications$

I took a look at the gemspec files and found that they contained the name and version of the library. I copied the smallest of the files to hpricot-0.6.gemspec and used the gemspec documentation to find out which parameters are required. I wound up with the following in /var/lib/gems/1.8/specifications/hpricot-1.6.rb.

Gem::Specification.new do |s|
  s.name = %q{hpricot}
  s.version = "0.6"
end

I tried running:

ben@magicthise:~$ gem install merb --include-dependencies

And it worked!

It might not be everything that’s needed to get it working — but now I at least know how to inject a package.

I’ve become a somewhat avid twitter user over the last several months. It’s helped me to stay in contact with existing friends and to get to know a few people from Refresh Phoenix, a local web design/development club. For those who don’t know what it is, it’s like LiveJournal, except each blog entry is limited to 140 characters, the friends feature works slightly differently, and it has good integration with SMS.

A couple of things I really like about it:

  • The 140 character limit. Twitter has a strict 140-character limit on all blog posts (tweets in twitter lingo). I’ve found this to be a very useful constraint. It reduces the amount of reading I have to do to keep tabs on friends. It also reduces the amount of time spent writing. As long as I don’t follow too many people, and don’t follow those that post too much, I can avoid spending too much time on twitter.

    I think it is also helping me to be a better writer and conversationalist. Trying to tell a story in 140 characters can be an interesting exercise. Inevitably, some details need to be dropped. Sometimes the story is not as good because it’s missing some interesting details, but often what’s left out is uninteresting. I had one such moment today.

    Yesterday, I was hanging out with some friends and told them a story. About half of the people found it interesting, but most thought it was long-winded and the half who weren’t interested were bored by it. If I had been thinking like I am when I write a twitter post, it might have been better received.

    I think the 140-character limit is a constraint people ought to embrace. There are a couple of ways to get around it — posting multiple tweets or dropping vowels and using lots of abbreviations and text-messaging-speak. I have a couple of rules of thumb. I try not to make a post that would make absolutely no sense to someone who didn’t read the other post. I also avoid shortening more than two or three words to make my post fit in 140 characters.

  • Easy come, easy go. On Twitter, if someone follows you it sends you a friendly notice with the username of the person who follows you. If someone stops following you, it sends you no such notice. So, unless you’re constantly checking the list of people who follow you, you can’t give them a hard time about not following you anymore.

    It might annoy some people, but it’s for the greater good. It encourages people not to break twitter etiquette, or else people might stop following them. It also makes twitter fun to use, because if one user is being annoying, you can quit following them instantly and not face immediate blowback, unless that person is a real jerk.

  • Best Wishes. On twitter, the notification e-mails you receive when a person follows you end with the following signature:

    Best,
    Twitter

    A few times, that’s been just the thing to help me to have a better day. The people at twitter are wishing everyone using their service the best. It’s the best closing salutation ever, IMHO. Thanks, folks!