Create a gist now

Instantly share code, notes, and snippets.

Shows a strategy for creating both MRI and JRuby versions of a gem.
# Builds the gem for the current rvm ruby/platform.
# Run this once for MRI and once for JRuby, as in:
# rvm 1.9
# ./
# rvm jruby
# ./
RUBY_VERSION=`rvm current`
echo Building gem $GEM_NAME from $GEM_SPEC for Ruby version $RUBY_VERSION.
echo The Gemfile.lock for this version will be copied to $GEMFILE_LOCK_VERSION_SAVE_NAME.
mv Gemfile.lock Gemfile.sav 2> /dev/null
echo Running bundle install...
bundle install
echo Building gem from $GEM_SPEC...
gem build $GEM_SPEC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment