昨天一晚上折磨的我啊都快疯掉了。

按照http://railstutorial-china.org方法配制,到rvm requirements这个命令执行时就麻烦事来了。

WutekiMacBook-Pro:~ wuxj$ rvm requirements
Checking requirements for osx.
Error: No available formula for gcc46
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ',
showing last lines of /Users/wuxj/.rvm/log//update_system.log
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.'
+ rvm_pretty_print stderr
+ case "${rvm_pretty_print_flag:=auto}" in
+ case "${TERM:-dumb}" in
+ case "$1" in
+ [[ -t ]]
+ return
+ printf %b 'Failed to update Homebrew, follow instructions here:
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.\n'
Failed to update Homebrew, follow instructions here:
https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
+ return
Requirements installation failed with status: .

开始以为是Homebrew没更新,所以执行了下brew update,结果:

WutekiMacBook-Pro:~ wuxj$ brew update
error: The following untracked working tree files would be overwritten by merge:
Library/Formula/ant.rb
Library/Formula/libarchive.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

执行了下brew doctor

WutekiMacBook-Pro:~ wuxj$ brew doctor
Warning: Some directories in your path end in a slash.
Directories in your path should not end in a slash. This can break other
doctor checks. The following directories should be edited:
/Users/wuxj/Downloads/adt-bundle-mac-x86_64-/sdk/platform-tools/
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (5.1.). Please `brew update` and if that doesn't help, file
an issue with the output of `brew --config`:
https://github.com/mxcl/homebrew/issues Thanks!

执行bundle




Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /Users/wuxj/.rvm/rubies/ruby-2.1./bin/ruby -r ./siteconf20140830--1hd6znq.rb extconf.rb
Building nokogiri using packaged libraries.
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options. Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/wuxj/.rvm/rubies/ruby-2.1./bin/ruby
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build extconf failed, exit code Gem files will remain installed in /Users/wuxj/.rvm/gems/ruby-2.1./gems/nokogiri-1.6.3.1 for inspection.
Results logged to /Users/wuxj/.rvm/gems/ruby-2.1./extensions/x86_64-darwin-/2.1.-static/nokogiri-1.6.3.1/gem_make.out
An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.3.1'` succeeds before bundling.

依然不行,执行 gem install nokogiri -v '1.6.3.1' , 还是不行。

WutekiMacBook-Pro:sample_app wuxj$ gem install nokogiri
Building native extensions. This could take a while...
Building nokogiri using packaged libraries.
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension. /Users/wuxj/.rvm/rubies/ruby-2.1./bin/ruby -r ./siteconf20140830--1vvz386.rb extconf.rb
Building nokogiri using packaged libraries.
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options. Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/wuxj/.rvm/rubies/ruby-2.1./bin/ruby
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build extconf failed, exit code Gem files will remain installed in /Users/wuxj/.rvm/gems/ruby-2.1./gems/nokogiri-1.6.3.1 for inspection.
Results logged to /Users/wuxj/.rvm/gems/ruby-2.1./extensions/x86_64-darwin-/2.1.-static/nokogiri-1.6.3.1/gem_make.out

最后,在stackoverflow上找到个大神解救了我。就是各种brew安装啊。。。

brew install autoconf
brew install automake
brew install libtool
brew install ap
ple-gcc42
brew install libyaml
brew install libxslt
brew install libksba
brew install openssl

结果

WutekiMacBook-Pro:sample_app wuxj$ rvm requirements
Checking requirements for osx.
Updating certificates in '/usr/local/etc/openssl/cert.pem'.
Requirements installation successful.

终于解决了。

Mac上RoR环境搭建问题的更多相关文章

  1. Mac上Hive环境搭建

    本文介绍在Mac上搭建Hive环境. 建议首先配置好Hadoop,搭建与配置可以参考我之前的博文Mac Hadoop的安装与配置. 当然你也可以选择使用Docker搭建环境,本文不作介绍. 安装 对于 ...

  2. Tidb go mac 上开发环境搭建

    1.安装golang 运行环境 2.安装lite ide 工具 3.安装dep 包管理工具 4.安装delve debuger 调试工具 我用的是mac hight sierra 10.13 版, 会 ...

  3. MAC上python环境搭建

    mac自带的有python,如果你需要查看版本,打开terminal输入以下命令: python --version 如果你需要安装新的python版本,有几种方法可以安装,一是去python官网下载 ...

  4. windows转mac-开发环境搭建(二):mac上java环境搭建

    1.首先下载jdk,地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 2.安 ...

  5. RF+Appium框架自动化测试系列一之(Mac下Appium环境搭建)万事开头难

    消失了3个月,有一段时间没来园子更新博客了,各位看官见谅哈哈,消失是因为刚换了工作环境没外网,好多笔记没能及时的记录分享,以后有时间慢慢补上吧,这段时间主要接触了移动端app的自动化测试,公司为了快速 ...

  6. Mac上Node环境配置

    公司配备Mac笔记本,以前没用过mac开发项目,一开始依然是从node官网下载安装包,后来领导说最好是用brew安装软件,这样比较方便,安装和卸载,只要在命令行输入相应的 install 和 unin ...

  7. (干货分享)mac python+appium环境搭建

    因为mac本自带python2.x(不建议卸载,因为本本本身有很多依赖与此),所以装python3的过程极其坎坷,勉强装好后也总是各种报错.这次装appium环境,直接把原来的python3卸了,用h ...

  8. Mac+appium+iOS 环境搭建

    Mac+appium+iOS 环境搭建,需要用到的信息如下,参考搭建环境. 1.安装brew,安装介绍:https://jingyan.baidu.com/article/fec7a1e5ec3034 ...

  9. 在MAC上安装虚拟机搭建Ubuntu开发环境

    由于工作需要,需要在LINUX环境搭建服务器,但是工作中使用的是MAC系统,只好用虚拟机来搭建LINUX服务器环境.下面记录介绍一下搭建步骤以供需要的人参考使用. 下载准备 虚拟机使用VMWare   ...

随机推荐

  1. 查看数据库中有哪些活动的事务,对应的会话id,执行的语句

    select dbt.database_id, DB_NAME(dbt.database_id) '数据库名', dbt.transaction_id, at.name, at.transaction ...

  2. Makefile 入门与基本语法 分类: C/C++ ubuntu 2015-05-18 11:16 466人阅读 评论(0) 收藏

    在我看来,学会写简单的Makefile,阅读较复杂的makefile,是每一个Linux程序员都必须拥有的基本素质.Makefile可以自动识别哪些源文件被更改过,需要重新编译,那些不需要.从而节省大 ...

  3. hadoop错误org.apache.hadoop.mapred.MapTask$NewOutputCollector@17bda0f2

    错误: org.apache.hadoop.mapred.MapTask$NewOutputCollector@17bda0f2 java.io.IOException: Spill failed 错 ...

  4. mysql 插入语句

    mysql 插入语句 什么时候用单引号,什么时候不用? 1.先创建一个表 create table user(username varchar(255),age int,marry boolean,b ...

  5. springMvc中406错误解决,springMvc使用json出现406 (Not Acceptable)

    springMvc中406错误解决, springMvc使用json出现406 (Not Acceptable) >>>>>>>>>>> ...

  6. android-satellite-menu

    使用过Path的人都应该知道,在Path主界面的左下方有一个非常有意思的菜单.菜单由一个主按钮组成,当用户点击该按钮时,就会有一连串的按钮弹出,而Satellite Menu正是该菜单的一个开源版本. ...

  7. c语言学习之基础知识点介绍(七):循环结构

    本节主要介绍循环结构 一.while循环 /* 语法: while(表达式){ //循环体; } 注意:循环变量.循环条件和循环控制语句三者缺一不可. 例如: */ ; //循环变量 ){ //循环条 ...

  8. SQL 2012的分页

    今天看到一篇文章介绍2012中的分页,就想测试一下新的分页方法比原先的有多少性能的提升,下面是我的测试过程(2012的分页语法这里不在做多的说明,MSDN上一搜就有): 首先我们来构造测试数据: -- ...

  9. NodeJS学习笔记—2.AMD规范

    CommonJS加载模块是同步的,而AMD模块加在是非同步的,允许指定回调函数.由于Nodejs主要用于服务器编程,模块文件一般都存在于本地,所以加载很快,不需要考虑非同步加载,用CommonJS即可 ...

  10. 【转】Objective-C中的instancetype和id关键字

    原文:http://blog.csdn.net/wzzvictory/article/details/16994913 一.什么是instancetype instancetype是clang 3.5 ...