local ruby_version_path='.ruby-version' local ruby_gemset_path='.ruby-gemset' if [[ -f $ruby_version_path ]]; then local ruby_version=`cat $ruby_version_path` fi if [[ -f $ruby_gemset_path ]]; then local ruby_gemset=`cat $ruby_gemset_path` fi if [ ! -z $ruby_version ]; then if [ ! -z $ruby_gemset ]; then echo `which rvm` rvm use $ruby_version@$ruby_gemset else rvm use $ruby_version fi fi