zoukankan      html  css  js  c++  java
  • Mac 下 fastlane 安装 以及常见错误处理

    fastlane 流程化提包相关内容,这是我一路自己安装 以及给同事安装遇到的问题汇总 以及我找到的解决方案 记录一下

    安装fastlane
    sudo gem install fastlane
     
    1>报错: You don't have write permissions for the /usr/bin directory. 
    1>解决: 将命令改为: sudo gem install fastlane -n /usr/local/bin
    参考: https://www.jianshu.com/p/b8406ff1e2f1
     
    2>报错: Failed to build gem native extension.
    根据报错内容。 会给出错误日志的位置。那么在console 输入:open 位置 查看具体报错内容
    In file included from if_ruby.c:113:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:33:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found #include "ruby/config.h"
    2>解决: 将头文件软链接过去
    cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby
    ➜ ruby sudo ln -s ../universal-darwin17/ruby/config.h ./config.h
    参考: https://www.tianmaying.com/snippet/1852
     
    3> 报错: ERROR: Failed to build gem native extension.
    make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `unf.o'. Stop.
    make failed, exit code 2
    3> 解决:在 ruby-2.3.0 目录下创建一个 universal-darwin18
    在console下:
    cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0
    mkdir universal-darwin18
    cp -r ./universal-darwin17/* ./universal-darwin18/
     
    4> 报错    Fastlane bundle update卡住解决方案
    4> 解决  修改源
    1. 打开工程中的Gemfile文件
    source "https://rubygems.org"
    替换为
    source "https://gems.ruby-china.com";
     
    更换为https://gems.ruby-china.com保存,然后再cd到你的项目目录下,执行bundle update
     
     

    5> 报错 /Library/Ruby/Site/2.3.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
    from /Library/Ruby/Site/2.3.0/rubygems.rb:308:in `activate_bin_path'
    from /usr/local/bin/bundle:23:in `<main>'

    5> 解决  sudo gem install bundler -n /usr/local/bin -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"

    安装fastlane过程中有可能报 fastlane requires Ruby version >= 2.2.2

    这时候就需要更新ruby版本 安装 rvm 通过rvm 来更新 ruby

     curl -sSL https://get.rvm.io | bash -s stable

    如果报invalid byte sequence in US-ASCII 。 这个错则需要设置 环境变量

    在命令行输入vi  ~/.bash_profile 输入

    export LC_ALL=en_US.UTF-8

    export LANG=en_US.UTF-8

    然后 esc  => !wq => 

    使配置生效  source ~/.bash_profile

  • 相关阅读:
    ArchLinux安装
    数据库优化空间换时间优化
    SQL server 系统优化通过执行计划优化索引(2)
    SQL 语句技巧递归查询机构和下属机构的用户数
    SQL语句技巧复杂逻辑的SQL简单实现(2)
    用最少的成本获得最大收益――论DBA在企业可持续发展中的价值
    sql server性能分析定时收集系统运行情况
    SQL server 数据库自动备份
    Sql Server 2005 实现Oracle 10g的rangelist/range等组合分区功能
    关于Oracle学习以及DBA工作机会(转)
  • 原文地址:https://www.cnblogs.com/lesten/p/11735610.html
Copyright © 2011-2022 走看看