Skip to content

Instantly share code, notes, and snippets.

@gregd
Created October 22, 2011 11:50
Show Gist options
  • Save gregd/1305906 to your computer and use it in GitHub Desktop.
Save gregd/1305906 to your computer and use it in GitHub Desktop.
Ubuntu 11.10 RubyMine and rails-footnotes gem
[Default Applications]
x-scheme-handler/txmt=openInMine.desktop
#!/home/scottp/.rvm/bin/rvm-auto-ruby
#Change the #! line to reflect the location of ruby in your environment
require 'uri'
require 'cgi'
my_url = CGI::parse(URI::parse(ARGV[0]).query)
file = URI::parse(my_url['url'][0]).path
line = my_url['line'][0]
#my mine command is located in /usr/local/bin
#YMMV, change following line as needed.
exec "mine -l #{line} #{file}"
[Desktop Entry]
Name=openInMine
Comment=RubyMine mine cmd
Exec=/usr/local/bin/openInMine %u
Terminal=false
Type=Application
Categories=Application;
StartupNotify=false
MimeType=x-scheme-handler/txmt;
NoDisplay=true
@talyric
Copy link

talyric commented Mar 25, 2015

I had to sudo chmod +x openInMine before it would work, in case it helps anyone else. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment