Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm very fond of TextMate's "Comment Line/Selection" bundle, which lets me use ⌘-/ to comment or un-comment highlighted lines. Recently, however, when I use that key combination, I get this error:

Comment Line / Selection:16:in `require': no such file to load -- /lib/escape (LoadError)

The bundle is in Ruby, and the line of code in question is a require:

require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape"

I don't see TM_SUPPORT_PATH defined in my preferences, and I can't find a file named escape on my Mac.

This is TextMate 2.0-alpha.9419. It's possible that a recent update broke this bundle, but I can't quite pin it down. Ideas for how to restore this function would be very welcome!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If env ruby is Ruby 2.0 or 1.9, try either:

  • Editing PATH or TM_RUBY in Preferences > Variables.
  • Changing #!/usr/bin/env ruby to #!/usr/bin/ruby Source > Menu Actions > Comments > Comment Line / Selection.

Or try temporarily deleting bundles. From [TxMt] TM2 error running Comment Line/Selection - Google Groups:

Your bundles are likely messed up.

The TM_SUPPORT_PATH comes from the Bundle Support bundle, so you may have uninstalled that.

You can check Preferences → Bundles or remove ~/Library/Application Support/{TextMate,Avian}/ and relaunch to get back to defaults.

TM_SUPPORT_PATH is something like ~/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared. Try running echo $TM_SUPPORT_PATH or env with ⌃R.

share|improve this answer
1  
Uninstalling and reinstalling the "Bundle Support" bundle did the trick. (Uninstalling and reinstalling "Source", which provides the actual shortcut, didn't.) I wouldn't have tried that one without this pointer, thanks! –  pjmorse May 21 '13 at 18:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.