I18n 0.5.0 breaks Rails 2.3.8

Posted by Andrew Mon, 06 Dec 2010 20:38:06 GMT

So I'm working along on a crufty on Rails 2.3.8 project and my validations come up as:

{{attribute}} {{error}}

A quick WTF check reveals it's late so I must be missing something obvious. No problem, I'll make a new project and see which gem has broken this. 

*5 minutes pass*

Brand new project, one model, one field, one error... same thing is happening. I'm not running a fever so this has to be something else. After some frustrating debugging I wipe my gems and reinstall ruby and gems. I figured I just have way too many versions of too many gems and something is fighting with something else. Surprise, surprise the problem is gone. Next day I'm getting project by project up and installed (a nice sanity check anyway to make sure all the gems are accounted for in the appropriate places) and suddenly the same thing happens. Rage.

So now we play the blame game. Some quick debugging into I18n shows that the interpolations aren't being done. Maybe it's an I18n thing? I wipe I18n and voila! Problem disappears. Turns out that the nice folks at I18n decided to change the interpolation syntax and the nice folks in Rails land decided to adjust.... problem is, this breaks old Rails projects instantly. For future reference make sure you're using a different I18n for old stuff.