Skip to content

Instantly share code, notes, and snippets.

@hynkle
Created November 4, 2011 23:15
Show Gist options
  • Select an option

  • Save hynkle/1340742 to your computer and use it in GitHub Desktop.

Select an option

Save hynkle/1340742 to your computer and use it in GitHub Desktop.
.rvmrc to broker peace in the .rvmrc-in-repo war
# The best little rvmrc to solve those annoying debates about whether or not
# .rvmrc should be checked in.
# Check this file in as .rvmrc. Any project member who desires different
# settings simply creates a .rvmrc_override file, which will be used if present.
# You'll want to add .rvmrc_override to your .gitignore.
local DEFAULT='rvm 1.9.2@gemset_name --verbose --create'
[ -f .rvmrc_override ] && source .rvmrc_override || $DEFAULT
@jfredett
Copy link
Copy Markdown

jfredett commented Nov 9, 2011

See also: https://raw.github.com/jfredett/scripts/master/rvmrc.sh

sourcing this in your .bashrc (or .profile, if you prefer) will provide a function "rvmrc", which takes a single argument "create" -- running rvmrc create will present you with a choice of all your installed rubies, choose one, and it will generate this script with the current directory name as the gemset name, and the indicated ruby as the ruby.

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