码迷,mamicode.com
首页 > 其他好文 > 详细

[fastlane] [gem] [rvm] [ruby]

时间:2016-03-03 12:54:21      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:

使用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.4
Searching 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.bz2
Checking 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]

标签:

原文地址:http://www.cnblogs.com/-yfan/p/5237913.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!