Jeff Li

Be another Jeff

Bundles command error in TextMate 2

When getting the news that the famous text editor in Max OS platform–TextMate 2 had been released as an open source software in github, I couldn’t wait to  give it a try though I am a big fan of VIM. When trying to run scripts files such as Ruby, Python or Even Golang, I failed. The error information was shown like this :

/Users/xxxxxxx/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/escape.rb:23:in e_url': undefined method gsub’ for nil:NilClass (NoMethodError) from (erb):21:in header'_ _from /Users/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/erb.rb:835:in eval’ from /Users/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/erb.rb:835:in block in result'_ _from /Users/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/erb.rb:833:in call’ from /Users/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/erb.rb:833:in result'_ _from /Users/xxxxxxx/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/tm/htmloutput.rb:91:in header’ from /Users/xxxxxxx/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/tm/htmloutput.rb:68:in show'_ _from /Users/xxxxxxx/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/tm/executor.rb:110:in run’ _from /Users/xxxxxxx/Library/Application Support/Avian/Bundles/Go.tmbundle/Support/gomate.rb:63:in launch'_ _from Run:4:in

‘_

This is caused by the lack of themes files for the output window.The most easy way to solve this is getting the theme files and make the bundles find it.I am curious why doesn’t the textmate 2  ship with these files. 1. Get the files from here :  theme

  1. Extract it to anywhere you like, I put it in:  ~/Library/Application Support/Avian

  2. Create a new environment variable called ‘TM_THEME_PATH’  under Preferences -> Variables. Fill the path where you put your themes in the value field. In my case, the entry is this :

TM_THEME_PATH=$HOME/Library/Application Support/Avian/themes/

Enjoy the powerful editor brought by community of open source!

Comments