Skip to content

Instantly share code, notes, and snippets.

@gregd
Created October 22, 2011 11:50
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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
@gregd
Copy link
Author

gregd commented Oct 22, 2011

Based on https://gist.github.com/929314
Copy defaults.list, openInMine.desktop to ~/.local/share/applications and openInMine to /usr/local/bin

@anithri
Copy link

anithri commented Oct 22, 2011

Awesome! Works great for me in Gnome Shell too. thanks for the update!

@pgaertig
Copy link

Works great with better_errors gem and Xubuntu 13.10. Thanks!

@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