Bundler error in Rails app - same revision passes locally and on other branch

ruby

#1

Hello,

The following error came up out of the blue during the ‘bundle install’ step of the dependencies phase of my build:

bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 
The following gems are missing

[long list of gems missing]
[long list of gems not missing]

An error occurred while installing ffi (1.9.10), and Bundler cannot continue.

bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3  returned exit code 5

Make sure that `gem install ffi -v '1.9.10'` succeeds before bundling. Action failed: bundle install

I suspected the download link for the ‘ffi’ gem could be broken, but I was able to install locally. What’s especially strange is that this error only seems to come up when merging into my develop branch. The same revision (commit) on the ‘master’ branch clears locally and on circleci without this or any other issue issue. Any help would be greatly appreciated.

Thanks!

Peter


#2

What kind of output does gem install ffi -v '1.9.10' command result in? The error message should give you some more details on the issue.


#3

In the circleci logs, I see

Bundler::GemspecError: Could not read gem at /home/ubuntu/barre3-rails/vendor/bundle/ruby/2.1.0/cache/ffi-1.9.10.gem. It may be corrupted.

On my development machine, I get no such error:

$ gem install ffi -v '1.9.10'
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.10
Parsing documentation for ffi-1.9.10
Done installing documentation for ffi after 4 seconds
1 gem installed

#4

Could you please try rebuilding without cache? An older version of the same gem could have been cached at some point, or the cache could have got corrupted in some way. If that’s the case, rebuilding without cache should help.


#5

Hi alexey - Rebuilding “without cache” has me back up and running. Thanks so much!


#6