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

按照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. Android 解决双卡双待手机解析短信异常

    开发中,难免会遇到各种各样的适配问题,尤其是经过深度修改定制过的系统,有的无论是软硬件上都有很大的区别,这里不得不提到一种奇葩的机型,没错,那就是双卡双待的手机(比如XT800, A60, S8600 ...

  2. MapReduce中的Join算法

    在关系型数据库中Join是非常常见的操作,各种优化手段已经到了极致.在海量数据的环境下,不可避免的也会碰到这种类型的需求,例如在数据分析时需要从不同的数据源中获取数据.不同于传统的单机模式,在分布式存 ...

  3. 一次向svn中增加所有新增文件 svn add all new files

    svn st | grep '^\?' | tr '^\?' ' ' | sed 's/[ ]*//' | sed 's/[ ]/\\ /g' | xargs svn add

  4. android之AlertDialog 点击其他区域自动消失

    遇到一个问题记录下来,在开发中使用了AlertDialog,想点击屏幕其他区域的时候让这个dialog消失,一开始不做任何设置,在小米手机可以正常显示,但是在三星中却有问题,后来发现少了一个属性: V ...

  5. yii2 验证码的使用

    @see  http://www.yiiframework.com/doc-2.0/yii-captcha-captcha.html 以下根据 MVC 模型的顺序来添加代码 1. model 层, 或 ...

  6. webapi 接口规则

    [HttpPost] [AuthorizeFilter] public HttpResponseMessage DeleteStudentInfo([FromBody] object value) { ...

  7. SELECT [Code] ,[AlarmID] ,[ItemName] ,[isDeleted] ,[Remark] FROM [LjlData].[dbo].[T_BaseDetail] union select 0--

    SELECT  [id]       ,[AlarmID]       ,[ItemName]       ,[isDeleted]       ,[Remark]   FROM [LjlData]. ...

  8. 用Module元素实现SharePoint Webpart Page的自动生成

    最近研发的项目中开发了很多的WebPart,每次部署这些WebPart到新环境中总是很麻烦,因为自己要新创建WebpartPage,同时还要把这些WebPart放到指定的WebPart页中去: 为了方 ...

  9. H TML5 之 (3)转动的圆球

    HTML5 练手之二,一个能够为之圆心转动的圆球,原理和时钟的非常像,只是要把握转动的时间控制,同时加入了点渐变色 HTML5 练手之二,一个能够为之圆心转动的圆球,原理和时钟的非常像,只是要把握转动 ...

  10. c语言学习之基础知识点介绍(一):输出语句和变量简单介绍

    本系列是为了学习ios做准备的,也能作为c语言入门的教程看看. c语言的程序结构: 1.顺序结构:自上而下依次执行. 2.分支结构:程序有选择的执行某段代码或者不执行某段代码. 3.循环结构:程序循环 ...