Skip to content

Instantly share code, notes, and snippets.

@Sutto
Created February 28, 2011 01:12
Show Gist options
  • Save Sutto/846775 to your computer and use it in GitHub Desktop.
Save Sutto/846775 to your computer and use it in GitHub Desktop.
gemset_under_alias() {
local gemset="$1"
local alias_name="$2"
local fallback_ruby="$3"
local expanded_alias="$(rvm alias show "$alias_name" 2>/dev/null)"
if [[ -n "$expanded_alias" ]]; then
rvm "$alias_name@$gemset" --create
else
rvm "$fallback_ruby@$gemset" --create
fi
}
gemset_under_alias "recruitment_platform" "passenger" "ree-1.8.7-2011.03"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment