Rubygems annoyances

Earlier today while working on Ruby CLI Mailer, I had a problem installing the pony rubygem. I was getting the following error when trying to install the pony via rubygems:

ERROR: Error installing pony:
invalid gem format for /home/tony/.rvm/gems/ruby-1.8.7-p352/cache/pony-1.3.gem
ERROR: Error installing pony:
invalid gem format for /home/tony/.rvm/gems/ruby-1.9.2-p290/cache/pony-1.3.gem

I soon came to notice that the problem was because the Barnes&Noble wifi session had expired and I had to reconnect to their network. After getting my laptop online, I tried to install the gem, but once again I was still getting the invalid gem error. This was even after I removed the gem from all Ruby installations (RVM) and tried to install them from scratch. Knowing that the issue was caused because the files were partially downloaded, I removed both cache gem files and voila, I was able to install the pony rubygem.

While it would be wonderful if every single rubygem package would be digitally signed of some sort, it would have been helpful if at least it had some sort of checksum verification after it downloads the package prior to installing any gems. This is certainly somewhat scary since rubygems is not able to detect/verify that it downloaded the right package without any sort of alterations.

Leave a Reply

Your email address will not be published. Required fields are marked *