0

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!

0

1 Answer 1

3

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.

1
  • 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, 2013 at 18:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .