May
26

Replacing Ruby’s URI with Addressable

Corey and I have been seriously tearing apart some URLs in our recent work and found that the standard URI library in ruby just wasn’t cutting it. It didn’t parse and merge exactly like we expected, sometimes even dropping parts of the URL. It also had problems handling special characters in URLs like these: ™ ‘ ’ ° ®. We found the Addressable ruby gem from sporkmonger on git hub. From the description it sounded like exactly what we needed, “Addressable is a replacement for the URI implementation that is part of Ruby’s standard library. It more closely conforms to the relevant RFCs and adds support for IRIs and URI templates.”

Share and Enjoy:
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • E-mail this story to a friend!
  • Print this article!
  • Posterous
Feb
23

Upgrading/downgrading Rubygems

How to upgrade/downgrade Ruby gems/Rubygems. Some times you have a legit reason for needing a particular version of rubygems to be installed. Here’s how to choose the version that gets installed.

sudo gem install rubygems-update -v 1.2.0

Obviously replace your version number with the one you want to downgrade to.

Then, go ahead and run

sudo update_rubygems
Reblog this post [with Zemanta]

Share and Enjoy:
  • Twitter
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Facebook
  • E-mail this story to a friend!
  • Print this article!
  • Posterous