美文网首页
fastlane安装环境bundler报错

fastlane安装环境bundler报错

作者: _coCo__ | 来源:发表于2020-07-05 10:34 被阅读0次

    fastlane安装环境bundler报错

    ~> fastlane -v
    fastlane installation at path:
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/bin/fastlane
    -----------------------------
    [⠼] 🚀 /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:105: warning: already initialized constant Bundler::FileUtils::VERSION
    /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:105: warning: previous definition of VERSION was here
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
    /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: previous definition of S_IF_DOOR was here
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
    /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: previous definition of DIRECTORY_TERM was here
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
    /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: previous definition of OPT_TABLE was here
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
    /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: previous definition of LOW_METHODS was here
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: already initialized constant Bundler::FileUtils::METHODS
    /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: previous definition of METHODS was here
    Traceback (most recent call last):
        24: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
        23: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
        22: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/bin/fastlane:23:in `<main>'
        21: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/bin/fastlane:23:in `load'
        20: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/bin/fastlane:23:in `<top (required)>'
        19: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/fastlane/lib/fastlane/cli_tools_distributor.rb:41:in `take_off'
        18: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        17: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        16: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/fastlane/lib/fastlane.rb:27:in `<top (required)>'
        15: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        14: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        13: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/fastlane/lib/fastlane/plugins/plugins.rb:9:in `<top (required)>'
        12: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        11: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
        10: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/fastlane/lib/fastlane/plugins/plugin_manager.rb:3:in `<top (required)>'
         9: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/fastlane/lib/fastlane/plugins/plugin_manager.rb:4:in `<module:Fastlane>'
         8: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/fastlane/lib/fastlane/plugins/plugin_manager.rb:5:in `<class:PluginManager>'
         7: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
         6: from /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
         5: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler.rb:7:in `<top (required)>'
         4: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler.rb:7:in `require_relative'
         3: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:3:in `<top (required)>'
         2: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in `<module:Bundler>'
         1: from /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in `<class:GemfileError>'
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:9:in `status_code': Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered (ArgumentError)
    

    根据报错,是安装的bundle问题
    删除重新安装

    ~> gem uninstall bundler
    Gem bundler-2.1.2 cannot be uninstalled because it is a default gem
    Successfully uninstalled bundler-2.1.4
    # shuaishuai in ~ [10:16:17]
    ~> gem list | cut -d" " -f1 | xargs gem uninstall -aIx
    
    Gem zlib-1.1.0 cannot be uninstalled because it is a default gem
    Gem yaml-0.1.0 cannot be uninstalled because it is a default gem
    ERROR:  While executing gem ... (Gem::InstallError)
        xmlrpc is not installed in GEM_HOME, try:
        gem uninstall -i /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0 xmlrpc
    ~> gem list bundler
    
    *** LOCAL GEMS ***
    
    bundler (default: 2.1.2)
    bundler-unload (1.0.2)
    rubygems-bundler (1.4.5)
    

    还没有卸载完成
    进一步删除

    # shuaishuai in ~ [10:24:42]
    ~> ~/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/specifications/default/
    
    
    # shuaishuai in ~/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/specifications/default [10:24:49]
    ~> rm ~/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/specifications/default/bundler-2.1.2.gemspec
    
    # shuaishuai in ~/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/specifications/default [10:25:05]
    ~> gem list bundler
    
    *** LOCAL GEMS ***
    
    bundler-unload (1.0.2)
    rubygems-bundler (1.4.5)
    

    卸载完成了,再次安装,并设置成默认:

    ~> gem install bundle
    Fetching bundler-2.1.4.gem
    Successfully installed bundler-2.1.4
    Successfully installed bundle-0.0.1
    Parsing documentation for bundler-2.1.4
    Installing ri documentation for bundler-2.1.4
    Parsing documentation for bundle-0.0.1
    Done installing documentation for bundler, bundle after 2 seconds
    2 gems installed
    
    # shuaishuai in ~/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/specifications/default [10:25:41]
    ~> gem list bundler
    
    *** LOCAL GEMS ***
    
    bundler (2.1.4)
    bundler-unload (1.0.2)
    rubygems-bundler (1.4.5)
    
    # shuaishuai in ~/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/specifications/default [10:25:44]
    ~> gem install bundler:2.1.4 --default
    Successfully installed bundler-2.1.4 as a default gem
    Done installing documentation for bundler after 0 seconds
    1 gem installed
    
    # shuaishuai in ~/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/specifications/default [10:25:58]
    ~> gem list bundler
    
    *** LOCAL GEMS ***
    
    bundler (default: 2.1.4)
    bundler-unload (1.0.2)
    rubygems-bundler (1.4.5)
    

    再尝试执行fastlane -v

    ~> fastlane -v
    fastlane installation at path:
    /Users/shuaishuai/.rvm/gems/ruby-2.7.0/gems/fastlane-2.150.3/bin/fastlane
    -----------------------------
    [✔] 🚀
    /Users/shuaishuai/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/highline-1.7.10/lib/highline.rb:624: warning: Using the last argument as keyword parameters is deprecated
    fastlane 2.150.3
    

    OK!
    打完收工!

    相关文章

      网友评论

          本文标题:fastlane安装环境bundler报错

          本文链接:https://www.haomeiwen.com/subject/iramqktx.html