Skip to content
This repository
Newer
Older
100644 24 lines (16 sloc) 0.714 kb
045a8505 »
2011-01-07 use gemset in rvmrc (thanks bowsersenior) - closes #231
1 #!/usr/bin/env bash
2
3 # adapted from: http://rvm.beginrescueend.com/workflow/rvmrc/
4
5 ruby_string="1.8.7"
6 gemset_name="cancan"
7
8 if rvm list strings | grep -q "${ruby_string}" ; then
9
10 # Load or create the specified environment
11 if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
12 && -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then
13 \. "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}"
14 else
15 rvm --create "${ruby_string}@${gemset_name}"
16 fi
17
18 else
19
20 # Notify the user to install the desired interpreter before proceeding.
21 echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
22
23 fi
Something went wrong with that request. Please try again.