you need to write me [updated]

About 20 minutes ago I entered a situation where every time I ran a script on my machine, the only output would be “you need to write me”

Naturally I was a little freaked out.

After retracing my steps over the past hour I remembered I had updated my ruby gems with a good ol “sudo gem update.”  I do it all the time so I didn’t see the cause for concern.  I went and looked at the newly installed gems and saw that there was libxml-ruby-1.0.0.  I browsed inside the gem and saw that it had a bin directory that had a ruby executable in it.  Cute.  Whoever the person is who released that needs to pay super close attention to what they are doing in the future.

Anyhow, I uninstalled the gem and when it asked if I wanted to remove the ruby executable I said yes.  This of course trashed the ruby executable in my /usr/bin.  Luckily I was able to retrieve it from Jay Amster and all was well.  If I was to do things over I’d say not to trash the executable and just delete the gem and all of its files.

Having that broken ruby executable in my path devastated my system though.  Half of my Textmate scripts no longer worked, none of my rails apps would execute, etc.  It was awful.  Thankfully I was able to figure it out quickly and hopefully if you run a search for “you need to write me” then you’ll stumble upon this post and know what to do to fix your machine.

UPDATE:

It would appear as though this problem is now resolved.  Maybe I got a bad install of the gem?  Maybe it was just a fluke?  Who knows?  It appears safe to install the latest libxml-ruby now though.

Posted in ruby at March 6th, 2009. No Comments.

Leopard and MySQL Gem

Those of you doing rails development work on Leopard with MySQL have probably seen this error message when starting your app:

WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

Normally I don’t care, but I figured since I was doing some cleanup today and getting things ready to move on to a longer term it might be good to have a properly working MySQL gem.  I like to run with a system that is close to what we run production.  The closer you get, the less surprises you have when you push it live.

Read More…

Posted in Code, Software Development, Uncategorized, ruby at November 6th, 2008. 2 Comments.