Getting Git.tmbundle working with Ruby1.9
Tim Harper has a great Git TextMate bundle that I use extensively, but since I’ve converted to Ruby 1.9, I’ve had some problems that others might have run into. Here’s what I did to get everything working nicely in Ruby 1.9:
First off, if you haven’t already, you’ll probably want to pull an updated version of TextMate’s support files from the svn repository to get some necessary 1.9 compatibility fixes.
cd ~/Library/Application Support/TextMate/ svn co http://macromates.com/svn/Bundles/trunk/Support</a>
You’ll need to clone my Git.tmbundle repository into the Bundles directory to get most of the changes I made to his bundle to deal with the basic Ruby 1.9 issues.
After that, you should get most of the basic functionality of the bundle, but you’ll probably notice that if you try to compare branches, revisions, or any of the more fun stuff, you’ll get the following error:
ArgumentError: An object in the argument tree could not be converted from (irb):17:in `to_plist' from (irb):17 from /usr/local/bin/irb:12:in `<main>'
This is because TextMate ships with a native plist library in its support directory (the one we checked out above) that isn’t quite Ruby 1.9 compatible. We’re lucky though, because an updated version of the library, osx-plist (written by Kevin Ballard) is on GitHub, so let’s pull and build it.
cd ~/Library/Application Support/TextMate/Support/lib/osx git clone git://github.com/kballard/osx-plist.git cd osx-plist/ext/plist ruby extconf.rb && make cp plist.bundle ../../../
Assuming you have TextMate using Ruby 1.9, you should now be able to compare revisions and branches, and do pretty much anything with the awesome Git.tmbundle!