Well, I wanted you to try something which didn’t use (directly or indirectly) the plist ruby gem. And of course something which actually worked (at least from Terminal.)
But try put the following line before the require 'plist' in your script:
$:.reject! { |path| path =~ %r{TextMate.*/Support/lib$} }
That should solve the plist clash. It’s not ideal, but will have to do until I find a better solution.