Specify Bundler versions in the Gemfile

2

A build of my project in TravisCI failed because Travis decided to use a version of Bundler (1.6.9, I think) that does not support blocks in source , like this:

source 'https://rails-assets.org' do
  gem 'rails-assets-urijs'
end

Without making any other changes, I re-launched the build, and there Travis used Bundler 1.11.2, which supports that feature, and everything worked fine.

So, how can I specify in my project the minimum version of Bundler that I want it to work with?

I think I've seen projects that list bundler as dependency on their Gemfile , but I'm not finding any references now.

    
asked by mgarciaisaia 22.01.2016 в 21:21
source

1 answer

2

To tell Travis.ci that you want to use a different version of Bundler you have to go one step before the Gemfile , because it is presumed that one already has bundler installed when you have a Gemfile .

Luckily with Travis.ci you can do it in the following way:

In your .travis.yml specific the following line:

before_install: gem install bundler -v 1.11.2

That's it.

Reference: link

    
answered by 22.01.2016 в 23:20