Skip to content

Commit

Permalink
simplifying .rvmrc
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Mar 8, 2011
1 parent 52435e9 commit bcf2756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
24 changes: 1 addition & 23 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -1,23 +1 @@
#!/usr/bin/env bash

# adapted from: http://rvm.beginrescueend.com/workflow/rvmrc/

ruby_string="1.8.7"
gemset_name="cancan"

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
rvm use 1.8.7@cancan --create
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "http://rubygems.org"

case ENV["MODEL_ADAPTER"]
when nil, "active_record"
gem "sqlite3-ruby", :require => "sqlite3"
gem "sqlite3"
gem "activerecord", :require => "active_record"
gem "with_model"
gem "meta_where"
Expand Down

0 comments on commit bcf2756

Please sign in to comment.