Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

rvmrc file that controls the version of Ruby, the Gemset, Rubygems, and Bundler. Use this if you want to control this stuff in your development workflow.

View .rvmrc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#!/usr/bin/env bash
 
# Bare minimum Gems that are needed to keep a Ruby development environment in sync. This assumes
# that you use bundler in your workflow to control the installation of all other gems. If you need
# to bump the bundler or rubygem version across your team, change that here, then run bundler and
# and keep going.
 
RVMRC=1.9.2@my_gem_set
RUBYGEM_VERSION="1.6.2"
BUNDLER_VERSION="1.0.15"
 
# Make this work with OS X Lion... for now...
if [[ `uname -v` =~ "Darwin Kernel Version 11" ]] ; then
export CC=/usr/bin/gcc-4.2
fi
 
# # Make sure we're using the right version for ruby
rvm use --create --install $RVMRC
 
# Enforce a version of Rubygems
if [[ `gem --version` != $RUBYGEM_VERSION ]] ; then
echo "Updating to RubyGems $RUBYGEM_VERSION..."
rvm rubygems $RUBYGEM_VERSION
fi
 
# Check if bundler is installed
if [[ "command -v bundle" ]] ; then
# Check if we have the right version
if [[ ! (`bundle --version` =~ $BUNDLER_VERSION) ]] ; then
echo "Updating to Bundler $BUNDLER_VERSION..."
gem install bundler -v$BUNDLER_VERSION
fi
else
echo "Installing Bundler $BUNDLER_VERSION..."
gem install bundler -v$BUNDLER_VERSION
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.