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.”
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]](http://img.zemanta.com/reblog_e.png?x-id=5cff2e51-79c1-4f83-b86d-0b8d6acb1cab)