7

Im using bundler to install stuff and since I have added Gemfile.lock, travis started to complain with:

Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES
section: 'echoe'

Of course, everything works locally. It also works using DeployBot. I even installed docker ubuntu and tried, still ok. My Gemfile.lock is not corrupt. Same versions of ruby and bundler is used.

What is going on?

Update

This is something related to bundler version. Im using 1.11.0, but got reports that it worked with eg. 1.8.3. ??

igr
  • 10,199
  • 13
  • 65
  • 111

2 Answers2

18

We've seen a very similar issue today on Buildkite due to the recent release of a new bundler version https://rubygems.org/gems/bundler/versions/1.11.0

We got the build working by stipulating the version of bundler to install.

gem install -v 1.10.6 bundler --no-rdoc --no-ri

and forcing the use of that

bundle _1.10.6_ install
sj26
  • 6,725
  • 2
  • 27
  • 24
s01ipsist
  • 3,022
  • 2
  • 32
  • 36
  • Thanx, this really did the trick! I tried to use 1.10.0 but for some reason it faild, but when I put what you said above in my travis.yml, it worked! – igr Dec 15 '15 at 08:37
  • 2
    I uninstalled the previous version and installed 1.10.6 and it worked for me. didn't have to force bundler to use a particular version. Thanks. – Ritikesh Feb 10 '16 at 06:10
  • @игор, @s01ipsist, can I have a look at how you specified it in your `.travis.yml`. The posted answer is yet to work for me and I think I have used the wrong statement in my travis file. – Afolabi Olaoluwa Oct 10 '16 at 08:00
6

Firstly, remove the gem lock file:

rm -f Gemfile.lock

Then install the dependencies:

bundle install

You can update the dependencies to ensure that you won't get an error:

bundle update
orangething
  • 708
  • 5
  • 16
Purkhalo Alex
  • 3,309
  • 29
  • 27
  • 1
    I've submitted an edit to remove the `-r` flag from `rm`, as this is not required to remove a single file and may encourage the bad practice of using it to remove any files with the greater potential to mistype the command and recursively remove an entire directory. – orangething Oct 09 '16 at 12:33