Skip to content

Instantly share code, notes, and snippets.

@jakebellacera
Created January 17, 2012 23:00
Show Gist options
  • Select an option

  • Save jakebellacera/1629627 to your computer and use it in GitHub Desktop.

Select an option

Save jakebellacera/1629627 to your computer and use it in GitHub Desktop.
Build in Sublime Text 2 with your RVM ruby. mv to ~/bin && chmod +x (with custom gemset features)
#!/usr/bin/env ruby
file = File.expand_path(ARGV[0] || (STDERR.puts('you must specify a ruby file'); exit(-1)))
# Run in RVM
exec("[[ -s \"$HOME/.rvm/scripts/rvm\" ]] && source \"$HOME/.rvm/scripts/rvm\" && rvm use YOUR_RUBY@YOUR_GEMSET && ruby #{file}")
# ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment