.rvmrc
author Mahlon E. Smith <mahlon@martini.nu>
Sat, 10 May 2014 17:43:18 -0700
changeset 1 8fb93d4764de
parent 0 aef8f9f4a788
permissions -rw-r--r--
Add gem description.

#!/usr/bin/env bash

# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory

environment_id="2.0.0@symphony-ssh"

if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
	&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]; then
	echo "Using ${environment_id}"
	. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"

	if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]; then
		. "${rvm_path:-$HOME/.rvm}/hooks/after_use"
	fi
else
	# If the environment file has not yet been created, use the RVM CLI to select.
	if ! rvm --create use  "$environment_id"
		then
		echo "Failed to create RVM environment '${environment_id}'."
		exit 1
	fi
fi

filename=".rvm.gems"
if [[ -s "$filename" ]]; then
	rvm gemset import "$filename"
fi