undefined method `last' for {}:Hash

I was getting this error on some pre-2.0 rails sites when trying to run rake after upgrading it to 0.8.1:

rake aborted!
undefined method `last' for {}:Hash

Luckily gem lets you have multiple versions installed and I was able to add this to my .profile:

alias old_rake="rake _0.7.3_"

Now I just run old_rake whenever I want to use rake on those sites and I don't get the error. I know this is a sucky, hackish solution, but I'm too lazy to find the real problem. Especially when I only work on a couple sites not on rails 2 yet.

Tags: rails rake  Meta: permalink

Comments

Leave a response

  1. rgcFebruary 01, 2008 @ 07:07 PM
    Thanks for the tip - this saved me.....
  2. Ben TuckerFebruary 19, 2008 @ 01:44 PM
    Thanks for the google-friendly title! This was very helpful.