Skip to content

Commit

Permalink
Downgrade to older bundler on older rails
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe authored and benoittgt committed Jan 13, 2019
1 parent 1c6074f commit 7ca3d04
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3"

before_install:
- script/update_rubygems_and_install_bundler
- script/downgrade_bundler_on_old_rails
- script/clone_all_rspec_repos

before_script:
Expand Down
19 changes: 19 additions & 0 deletions script/downgrade_bundler_on_old_rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# This file was generated on 2019-01-03T20:34:23+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
source script/functions.sh

if ruby -e "exit(ENV['RAILS_VERSION'].to_f < 5)"; then
# On Rails versions less than 5, Bundler 2.0 is not supported
echo "Warning dowgrading to older version of Bundler"
gem uninstall -aIx bundler

# this only works on Ruby 2.3 which is luckily the version we need to fix
if is_ruby_23_plus; then
rvm @global do gem uninstall -aIx bundler
fi

gem install bundler -v '1.17.3'
fi

0 comments on commit 7ca3d04

Please sign in to comment.