[TxMt] [Ruby] Name collision with Plist gem

Allan Odgaard throw-away-1 at macromates.com
Tue Nov 14 23:09:13 UTC 2006


On 14. Nov 2006, at 23:04, cremes.devlist at mac.com wrote:

> [...]
> I found a solution though I don't like it very much. I changed my  
> #require to use the absolute path to the plist gem, so now there  
> isn't a name collision.

You can also do:

     require 'rubygems'
     require_gem 'plist'

> Interestingly, TextMate does have its own plist implementation.  
> It's stored at TextMate.app/Contents/SharedSupport/Support/lib and  
> is a compiled binary object. It's using lots of CoreFoundation  
> stuff internally (run 'nm plist.bundle' for a list of symbols) and  
> thankfully there aren't any method name collisions.

The TM plist uses CoreFoundation, meaning it can read ASCII (old- 
style/openstep) and binary property lists in addition to XML plists  
-- the rubygem version only does the latter.

> Is there a way to force TextMate to put your local gems repository  
> earlier in the load path than its own internal libraries?

The problem with that is, then TM would start “crash” from getting  
the wrong plist, in all the TM commands which use our plist extension.

But probably we can re-export RUBYLIB for scripts running under  
RubyMate to not have TM’s support path included -- though personally  
I do much enjoy having it there.




More information about the textmate mailing list