Want to command left click on files in iTerm2 and have them open in RubyMine (or whichever JetBrains app you like?
In RubyMine, go to menu: Tools -> Create Command-line Launcher...
Below assumes that you use the default:
/usr/local/bin/mine
Open iTerm preferences -> Profiles -> Advanced -> Semantic History
Select Run command and paste:
/usr/local/bin/mine \5 --line \2 \1