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.
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:
Written by Vlad Shvedov
Related protips
2 Responses
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.
Probably it's possible share working directory on your VM for the host, where you have your editor or/and symlink it?