Skip to content

Instantly share code, notes, and snippets.

@geeksam
Created August 5, 2011 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geeksam/1128496 to your computer and use it in GitHub Desktop.
Save geeksam/1128496 to your computer and use it in GitHub Desktop.
Platypus .rvmrc file
# PROJECT_RUBY="ruby-1.8.7-p302"
PROJECT_RUBY="rbx-1.2.3-20110315"
# use the global gemset in order to check for and install bundler, since we
# don't need it to be different for different projects
rvm use $PROJECT_RUBY@global --create --install
NEED_GEM_VERSION='1.3.7'
echo -n "Rubygems version 1.3.7 required. Do we have the right version?... "
if `ruby -rubygems -e "puts (Gem::VERSION == '$NEED_GEM_VERSION') ? exit(0) : exit(1)"`; then
echo "check!"
else
echo "negative. Let's fix that, shall we?"
gem update --system $NEED_GEM_VERSION
fi
echo -n "Checking if bundler gem is installed... "
if `ruby -rubygems -e "gem 'bundler'" &>/dev/null`; then
echo "Yup, good to go."
else
echo "Nope. Doing that now."
gem install bundler
fi
# now use the gemset for this project and check the bundle
rvm use $PROJECT_RUBY@platypus-rails3 --create
bundle check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment