fastlane: bundle install fails when installing digest-crc on 2.150.0.rc2 onwards (incl. 2.150.0 official release)

New Release Candidate Issue Checklist

Issue Information

  • Breaking version: 2.150.0 rc2, but also 2.150.0
  • Last working version: 2.150.0 rc1
  • State of app: Irrelevant
  • First version of app?: Irrelevant

Issue Description

I can’t update fastlane to the latest version. I’m using rbenv, and on Ruby 2.6.5 it throws this error:

Error thrown on Ruby 2.6.5

Fetching digest-crc 0.6.0 (was 0.5.1)
Installing digest-crc 0.6.0 (was 0.5.1) with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.6.0/gems/digest-crc-0.6.0/ext/digest
rake RUBYARCHDIR\=/Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0/digest-crc-0.6.0
RUBYLIBDIR\=/Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0/digest-crc-0.6.0
rbenv: rake: command not found

The `rake' command exists in these Ruby versions:
  2.7.0


rake failed, exit code 127

Gem files will remain installed in /Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.6.0/gems/digest-crc-0.6.0 for
inspection.
Results logged to
/Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0/digest-crc-0.6.0/gem_make.out

An error occurred while installing digest-crc (0.6.0), and Bundler cannot continue.
Make sure that `gem install digest-crc -v '0.6.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  fastlane was resolved to 2.150.0, which depends on
    google-cloud-storage was resolved to 1.26.2, which depends on
      digest-crc

Error thrown on Ruby 2.7.0

Fetching digest-crc 0.6.0 (was 0.5.1)
Installing digest-crc 0.6.0 (was 0.5.1) with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.7.0/gems/digest-crc-0.6.0/ext/digest
rake RUBYARCHDIR\=/Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.7.0/extensions/x86_64-darwin-19/2.7.0/digest-crc-0.6.0
RUBYLIBDIR\=/Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.7.0/extensions/x86_64-darwin-19/2.7.0/digest-crc-0.6.0
/Users/rogerluan/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem rake (>= 0.a) with
executable rake (Gem::GemNotFoundException)
	from /Users/rogerluan/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
	from /Users/rogerluan/.rbenv/versions/2.7.0/bin/rake:23:in `<main>'

rake failed, exit code 1

Gem files will remain installed in /Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.7.0/gems/digest-crc-0.6.0 for
inspection.
Results logged to
/Users/rogerluan/Documents/Projects/tellus-ios/.vendor/ruby/2.7.0/extensions/x86_64-darwin-19/2.7.0/digest-crc-0.6.0/gem_make.out

An error occurred while installing digest-crc (0.6.0), and Bundler cannot continue.
Make sure that `gem install digest-crc -v '0.6.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  fastlane was resolved to 2.150.0, which depends on
    google-cloud-storage was resolved to 1.26.2, which depends on
      digest-crc

And when I try installing 2.150.0 rc1, it works, but with digest-crc 0.5.1 (which got upgraded on the latest release I assume). I tried installing every version in rc1 ~ rc7, including the the final latest version, deleting my bundle’s ruby gems between each install, and only rc1 succeeds.

Environment

I use rbenv I tried on ruby 2.6.5 and ruby 2.7.0, and they output different errors. I couldn’t find in the docs which ruby version I’m supposed to use (although the last working version is rc1 which I ran on Ruby 2.6.5) macOS catalina

Mentioning

cc: @joshdholtz

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 5
  • Comments: 17 (8 by maintainers)

Most upvoted comments

I have the same problem. The workaround I found is add gem rake to the Gemfile.

# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "fastlane"
gem "versionomy"
gem "rake" # <= Add this line

@joshdholtz yeah, looks like that. I’ve posted this on CircleCI forums, maybe someone there can help.

I think the problem might be in the gem digest-crc version 0.6.0, which was published today

It seems like you have not included the output of fastlane env To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍

@rogerluan @joshdholtz thank you again for your input. The issue was as you’ve guessed with CircleCI image of Xcode 12 beta. For some reason the native Ruby on that image produces this problem. If you change the ruby version to 2.7 on that image you don’t have this issue. For reference: https://discuss.circleci.com/t/xcode-12-beta-4-released/36956/8

@rogerluan Perfect! Thank you ❤️

I attempted to fix it here https://github.com/postmodern/digest-crc/pull/20 let’s see