Skip to content
Browse files

adding .rvmrc file

  • Loading branch information...
1 parent f960ef4 commit d79a49437494aeb257526b35d39a3da84ab84467 @ryanb ryanb committed Jan 17, 2011
Showing with 23 additions and 0 deletions.
  1. +23 −0 .rvmrc
View
23 .rvmrc
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+# adapted from: http://rvm.beginrescueend.com/workflow/rvmrc/
+
+ruby_string="1.9.2"
+gemset_name="nifty-generators"
+
+if rvm list strings | grep -q "${ruby_string}" ; then
+
+ # Load or create the specified environment
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
+ && -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then
+ \. "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}"
+ else
+ rvm --create "${ruby_string}@${gemset_name}"
+ fi
+
+else
+
+ # Notify the user to install the desired interpreter before proceeding.
+ echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
+
+fi

0 comments on commit d79a494

Please sign in to comment.
Something went wrong with that request. Please try again.