I recently upgraded my Mac to Yosemite, and now many Textmate 2 commands that I used to use all the time are failing and giving the following error—in this example I tried to run the "Comment line" command by pressing ⌘/:
The same thing happens for "Run", "Toggle String / Symbol", and many other Textmate commands.
When I click "Edit Command", it takes me to a script the first line of which is:
#!/usr/bin/env ruby18
If I take the 18
off of that, it seems to work, but I would have to do it for every command. There must be a better way.
I use rbenv and long ago I set my TM_RUBY variable to $HOME/.rbenv/shims/ruby
, but setting or unsetting that doesn't seem to make a difference now. I also tried adding that path to TM's PATH variable. Any other ideas?
I figured out an answer. Running ruby18
at the command line produced a "command not found" error. So I created a symlink to the system ruby (which is ruby 2.0) with that name:
ln -s /usr/bin/ruby /usr/local/bin/ruby18
That seems to have worked. Still not sure if that's the best solution. Open to any other ideas.