0

We recently added fastlane to our ionic project with a gemfile. It looks like the ionic appflow build also uses fastlane. When trying to build the project within appflow we get this error

$ run "fetch-updates"
$ run "build-app"
/usr/local/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' 
(2.1.4) required by your /builds/project-0/Gemfile.lock. (Gem::MissingSpecVersionError)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
Checked in 
'GEM_PATH=/root/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/bundle', execute 
`gem env` for more information
   from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in 
activate_dependencies'
   from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
   from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
   from /usr/local/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
   from /usr/local/lib/ruby/2.6.0/rubygems.rb:304:in `block in activate_bin_path'
   from /usr/local/lib/ruby/2.6.0/rubygems.rb:303:in `synchronize'
   from /usr/local/lib/ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
   from /usr/local/bundle/bin/fastlane:23:in `<main>'

Is there a way to hide this file from appflow or to tell it to not use it in it's own fastlane build? Or is my best bet to just rename this file before making a commit (really don't want to do this)?

BossmanT
  • 559
  • 1
  • 6
  • 17

1 Answers1

2

The issue was caused by the bundler version specified in the gemfile lock being different from what our platform was using. This should be fixed now.

  • I ended up solving this by renaming the Gemfile to something like `Gemfile.local` and then when we execute fastlane locally we will first `export BUNDLE_GEMFILE=Gemfile.local` and that resolved the problems for me. I had tried updating the bundler version in the gemfile but it still gave us issues unfortunately – BossmanT Mar 17 '21 at 17:34