gpt4 book ai didi

ruby - 在 mac 上安装、运行 FaSTLane for Flutter 时出错

转载 作者:行者123 更新时间:2023-12-01 18:20:25 25 4
gpt4 key购买 nike

点击链接Flutter Fastlane docs

运行命令:

brew cask install fastlane

返回:

Gems updated: slack-notifier atomos claide nanaimo xcodeproj rouge xcpretty terminal-notifier tty-screen tty-cursor tty-spinner commander-fastlane faraday faraday_middleware gh_inspector mini_magick rubyzip naturally simctl jwt memoist signet
Gems already up-to-date: fastlane
**ERROR: Error installing fastlane:
signet requires Ruby version >= 2.4.0.**
Cleaning up installed gems...
Attempting to uninstall xcpretty-0.2.6
Successfully uninstalled xcpretty-0.2.6
Attempting to uninstall xcodeproj-1.4.4
Successfully uninstalled xcodeproj-1.4.4
Attempting to uninstall rubyzip-1.2.1
Successfully uninstalled rubyzip-1.2.1
Attempting to uninstall nanaimo-0.2.3
Successfully uninstalled nanaimo-0.2.3
Attempting to uninstall memoist-0.15.0
Successfully uninstalled memoist-0.15.0
Attempting to uninstall gh_inspector-1.0.3
Successfully uninstalled gh_inspector-1.0.3
Attempting to uninstall faraday_middleware-0.11.0.1
Successfully uninstalled faraday_middleware-0.11.0.1
Attempting to uninstall faraday-0.12.1
Successfully uninstalled faraday-0.12.1
Attempting to uninstall commander-fastlane-4.4.4
Successfully uninstalled commander-fastlane-4.4.4
Attempting to uninstall claide-1.0.1
Successfully uninstalled claide-1.0.1
Attempting to uninstall rouge-1.11.1
Successfully uninstalled rouge-1.11.1
Clean Up Complete
Detected shell config file at path '~/.bash_profile'
Please add the following line to your bash profile:
export PATH="$HOME/.fastlane/bin:$PATH"
**After doing so close the terminal session and restart it to start using fastlane 🚀
🍺 fastlane was successfully installed!**

给出了这个输出。但是当我运行 ruby​​ -v 时

ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin16]

我得到这个输出。我在 .bash_profile 中添加了所有路径,然后在 android/文件夹内或任何给我提供此错误的地方运行 faSTLane envfaSTLane init

/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/faraday-0.17.1/lib/faraday/error.rb:95:in  <.module:Faraday>: superclass mismatch for class ConnectionFailed (TypeError)
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/faraday-0.17.1/lib/faraday/error.rb:6:in '<.top (required)>'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/faraday-0.17.1/lib/faraday.rb:80:in 'block in require_libs'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/faraday-0.17.1/lib/faraday.rb:79:in 'each'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/faraday-0.17.1/lib/faraday.rb:79:in 'require_libs'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/faraday-0.17.1/lib/faraday.rb:242:in '<.module:Faraday>'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/faraday-0.17.1/lib/faraday.rb:16:in '<.top (required)>'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.28.3/spaceship/lib/spaceship/client.rb:1:in '<.top (required)>'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.28.3/spaceship/lib/spaceship.rb:3:in '<.top (required)>'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.28.3/fastlane/lib/fastlane/setup/setup_ios.rb:1:in '<.top (required)>'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.28.3/fastlane/lib/fastlane/setup/setup.rb:57:in '<.top (required)>'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.28.3/fastlane/lib/fastlane.rb:10:in '<.top (required)>'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.28.3/fastlane/lib/fastlane/cli_tools_distributor.rb:18:in 'take_off'
from /.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.28.3/bin/fastlane:20:in '<.top (required)>'
from /.fastlane/bin/bundle/bin/fastlane:22:in 'load'
from /.fastlane/bin/bundle/bin/fastlane:22:in '<.main>'

尝试sudo gem install faSTLane后,它说

Successfully installed fastlane-2.137.0
Parsing documentation for fastlane-2.137.0
Done installing documentation for fastlane after 6 seconds
1 gem installed

但是当我再次编写 faSTLane envfaSTLane init 时,它给出了与上面相同的错误

最佳答案

基于此线程(感谢@lwj 的回答):

https://github.com/fastlane/fastlane/issues/15740

1- 可能需要先卸载 cask faSTLane:

brew cask uninstall fastlane

2- 然后使用 RubyGems 安装它:

sudo gem install fastlane -NV

也是因为Apple已经将默认shell改为zsh,引用@fdg13gustav回答:https://stackoverflow.com/a/58310864/1995358

3- 在主目录中创建 .zprofile 文件

关于这个线程: https://github.com/fastlane/fastlane/issues/12609

4- 将这些行添加到您的 ~/.zprofile 文件中:

export PATH="$HOME/.fastlane/bin:$PATH"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

关于ruby - 在 mac 上安装、运行 FaSTLane for Flutter 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59291771/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com