diff options
Diffstat (limited to '.rvmrc')
| -rw-r--r-- | .rvmrc | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +ruby_string="ruby-1.9.2-p290" +gemset_name="jekyll-blog" + +if rvm list strings | grep -q "${ruby_string}" ; then + 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 + if ! rvm --create "${ruby_string}@${gemset_name}" + then + echo "Failed to create RVM environment '${ruby_string}@${gemset_name}'." + fi + fi + + if ! command -v bundle ; then + gem install bundler + fi + + if [[ -e Gemfile ]]; then + bundle install + fi +else + echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory." +fi |
