Skip to content

Commit 373005c

Browse files
committed
Fix jruby build (#467)
* Use older version of bundler for jruby builds The jruby build started failing when Travis started using bundler version 1.14.3. It all worked on 1.13.7 so I'm switching back to that version when a jruby build is detected. [1] https://travis-ci.org/brigade/overcommit/jobs/194979683 [2] https://travis-ci.org/brigade/overcommit/jobs/189188271 * Pre-install rainbow to work around bundler issues on jruby Installing rainbow manually before doing bundle install helped fix the build locally for me. * Apply workaround for failing rainbow install I think I've found an issue describing the issues we've seen with the jruby build: ku1ik/rainbow#48 A workaround that people have applied is to run `gem update --system` as a before_install hook. I'm giving that a try. * Only apply gem update workaround for jruby The workaround added in the previous commit seems to be working, but only for the jruby build. We can conditionally apply it to prevent failing builds for other ruby versions.
1 parent 49ddb3c commit 373005c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ before_script:
1515
- git config --global user.email "travis@travis.ci"
1616
- git config --global user.name "Travis CI"
1717

18+
before_install:
19+
- '[[ $TRAVIS_RUBY_VERSION =~ ^jruby ]] && gem update --system || true'
20+
1821
script:
1922
- bundle exec rspec
2023
# Skip Overcommit on JRuby since it's unstable and doesn't actually test Overcommit

0 commit comments

Comments
 (0)