【问题标题】:Ionic Appflow - Could not find 'Bundler'Ionic Appflow - 找不到“Bundler”
【发布时间】:2021-04-08 01:34:47
【问题描述】:

我们最近使用 gemfile 在我们的 ionic 项目中添加了 fastlane。看起来 ionic appflow 构建也使用了 fastlane。尝试在 appflow 中构建项目时,出现此错误

$ 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>'

有没有办法从 appflow 中隐藏这个文件,或者告诉它不要在它自己的 fastlane 构建中使用它?或者我最好的选择是在提交之前重命名这个文件(真的不想这样做)?

【问题讨论】:

    标签: ruby ionic-framework fastlane ionic-appflow


    【解决方案1】:

    问题是由于 gemfile 锁定中指定的捆绑程序版本与我们平台使用的不同造成的。现在应该解决这个问题。

    【讨论】:

    • 我最终通过将 Gemfile 重命名为 Gemfile.local 之类的名称解决了这个问题,然后当我们在本地执行 fastlane 时,我们首先将 export BUNDLE_GEMFILE=Gemfile.local 解决了我的问题。我曾尝试更新 gemfile 中的捆绑器版本,但不幸的是它仍然给我们带来了问题
    猜你喜欢
    • 2020-03-02
    • 2016-07-11
    • 1970-01-01
    • 2013-11-05
    • 1970-01-01
    • 1970-01-01
    • 2021-02-23
    • 1970-01-01
    • 2014-02-02
    相关资源
    最近更新 更多