Skip to content

Commit 91dba46

Browse files
JonRowesebjacobs
authored andcommitted
Downgrade to older bundler on older rails
1 parent 1608ace commit 91dba46

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3"
2424

2525
before_install:
2626
- script/update_rubygems_and_install_bundler
27+
- script/downgrade_bundler_on_old_rails
2728
- script/clone_all_rspec_repos
2829

2930
before_script:

script/downgrade_bundler_on_old_rails

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
# This file was generated on 2019-01-03T20:34:23+00:00 from the rspec-dev repo.
3+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
4+
5+
set -e
6+
source script/functions.sh
7+
8+
if ruby -e "exit(ENV['RAILS_VERSION'].to_f < 5)"; then
9+
# On Rails versions less than 5, Bundler 2.0 is not supported
10+
echo "Warning dowgrading to older version of Bundler"
11+
gem uninstall -aIx bundler
12+
13+
# this only works on Ruby 2.3 which is luckily the version we need to fix
14+
if is_ruby_23_plus; then
15+
rvm @global do gem uninstall -aIx bundler
16+
fi
17+
18+
gem install bundler -v '1.17.3'
19+
fi

0 commit comments

Comments
 (0)