Ruby 1.9.2 is nice with speed boost and better unicode/encoding support, but it comes with a few backward incompatibilities. The biggest pain is Date.parse is now default to parse dd/mm/yyyy (European format) instead of mm/dd/yyyy. This means that in ruby1.9.2, Date.parse(’11/31/2010′) will error out. However, with the home_run gem, it only makes date run faster, and it can also help reverting this unfortunate decision in 1.9.2. I called this unfortunate because considering the vast amount of applications written to work on 1.8.7, migrated to 1.9.2 will now be broken at such a fundamental level. Whoever voted on or decided to switch the Date.parse format in 1.9.2 should be, well, quite ashamed of himself.
Nonetheless, running home_run is nice, but it comes with its own set of incompatibilities as well. Unfortunately, ruby-ole is in the list of the incompatible gems, and if you have to parse Excel files, you will need to either use roo or the spreadsheet gem, which both rely on ruby-ole. There is a fix for ruby-ole to work with home_run and, but it requires patching the gem code. I have submitted a ticket to the original developer of ruby-ole, aquasync, but it seems like there will be no easy way to get the code patched up for 1.9.2 and home_run. Moreover, I couldn’t get Bundler to work on the locally patched version of ruby-ole, even after asking help from the master himself, wycats, over the IRC channel #bundlers.
After some tinkering, I came up with a much cleaner and less obtrusive solution: patched up the latest version of ruby-ole (1.2.10.1) and packaged this as a new gem, then use this gem in the Gemfile list instead. This way bundler would get the correct It was the first time I have ever published a gem, and Gemcutter really made it super easy. So to get roo to work with 1.9.2 and home_run, use this in your Gemfile:
Hope this helps.
PS: to get 1.8.7 Date.parse behavior on 1.9.2 with home_run, put this at the top of your application.rb file:
Changing the default format is kind of an INSANE backwards-incompatible change — doesn’t even have any benefit. Sorry to be a hater but wow