標籤:
使用fastlane 實現快速持續的更新、在安裝過程中 出現的一系列問題:
1.安裝fastlane :sudo gem install fastlane
-錯誤:ERROR: Failed to build gem native extension.
#不要添加多個gem 源#開始以為是gem 源的問題#查看gem源gem sources# 刪除預設的gem源 gem sources --remove http://rubygems.org/# 增加taobao作為gem源 gem sources -a https://ruby.taobao.org/# 查看當前的gem源gem sources*** CURRENT SOURCES ***http://ruby.taobao.org# 請確保只有 ruby.taobao.org# 清空源緩衝gem sources -c# 更新源緩衝gem sources -u
錯誤仍然存在;
然後查到是ruby版本的問題
2.更新ruby版本,安裝rvm
http://blog.csdn.net/lissdy/article/details/9191351,
http://stackoverflow.com/questions/3696564/how-to-update-ruby-to-1-9-x-on-mac
curl -L get.rvm.io | bash -s stable
測試是否安裝正常 rvm -v
3.rvm install ruby-2.1.4,報下面的錯誤
? ~ git:(master) ? rvm install ruby-2.1.4Searching for binary rubies, this might take some time.Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.1.4.tar.bz2Checking requirements for osx./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘: cannot load such file -- mach (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘ from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>‘ from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘ from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘ from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>‘ from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘ from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require‘ from /usr/local/Library/brew.rb:16:in `<main>‘ERROR: ‘/bin‘ is not writable - it is required for Homebrew, try ‘brew doctor‘ to fix it!Requirements installation failed with status: 1.
然後這樣處理:
$ brew install openssl # if you want to install all dependencies run ‘rvm requirements‘$ rmv reinstall|install ruby-2.1.4
這裡參考了http://stackoverflow.com/questions/18863211/homebrew-permissions-mess
最後就順利安裝fastlane了。
[fastlane] [gem] [rvm] [ruby]