Last Updated: February 25, 2016
·
1.864K
· vsh

iTerm2 and Ruby/Rails/Rspec

When using iTerm2 on MacOS X during Ruby/Rails development, you can always Cmd-click on any line of output containing the path to the source code, and you'll have a file opened (with the cursor on the string, if that line contains a reference) in your default editor.

Picture

If your editor is not in the list, you can put a custom one to execute. For example, for RubiMine, you choose 'Run command' and:

/usr/local/bin/mine --line \2 \1

You can do the same for failed Rspec specs:

Picture

2 Responses
Add your response

Do you know if there is any way to force relative file path in backtrace? Since I run everything in Vagrant, all paths start with /vagrant, which I should either replace with host working directory path or just force to use relative path.

over 1 year ago ·

Probably it's possible share working directory on your VM for the host, where you have your editor or/and symlink it?

over 1 year ago ·