Skip to content

Instantly share code, notes, and snippets.

@guange2015
Created September 16, 2012 06:11
Show Gist options
  • Select an option

  • Save guange2015/3731244 to your computer and use it in GitHub Desktop.

Select an option

Save guange2015/3731244 to your computer and use it in GitHub Desktop.
_rvmruby
#!/bin/sh
# usage: _rvmruby <ruby version> [ruby arguments]
if [[ -s ~/.rvm/scripts/rvm ]]; then
. ~/.rvm/scripts/rvm
fi
ruby_version=$1; shift
rvm $ruby_version
exec ruby "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment