Mac上RoR环境搭建问题
昨天一晚上折磨的我啊都快疯掉了。
按照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环境搭建问题的更多相关文章
- Mac上Hive环境搭建
本文介绍在Mac上搭建Hive环境. 建议首先配置好Hadoop,搭建与配置可以参考我之前的博文Mac Hadoop的安装与配置. 当然你也可以选择使用Docker搭建环境,本文不作介绍. 安装 对于 ...
- Tidb go mac 上开发环境搭建
1.安装golang 运行环境 2.安装lite ide 工具 3.安装dep 包管理工具 4.安装delve debuger 调试工具 我用的是mac hight sierra 10.13 版, 会 ...
- MAC上python环境搭建
mac自带的有python,如果你需要查看版本,打开terminal输入以下命令: python --version 如果你需要安装新的python版本,有几种方法可以安装,一是去python官网下载 ...
- windows转mac-开发环境搭建(二):mac上java环境搭建
1.首先下载jdk,地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 2.安 ...
- RF+Appium框架自动化测试系列一之(Mac下Appium环境搭建)万事开头难
消失了3个月,有一段时间没来园子更新博客了,各位看官见谅哈哈,消失是因为刚换了工作环境没外网,好多笔记没能及时的记录分享,以后有时间慢慢补上吧,这段时间主要接触了移动端app的自动化测试,公司为了快速 ...
- Mac上Node环境配置
公司配备Mac笔记本,以前没用过mac开发项目,一开始依然是从node官网下载安装包,后来领导说最好是用brew安装软件,这样比较方便,安装和卸载,只要在命令行输入相应的 install 和 unin ...
- (干货分享)mac python+appium环境搭建
因为mac本自带python2.x(不建议卸载,因为本本本身有很多依赖与此),所以装python3的过程极其坎坷,勉强装好后也总是各种报错.这次装appium环境,直接把原来的python3卸了,用h ...
- Mac+appium+iOS 环境搭建
Mac+appium+iOS 环境搭建,需要用到的信息如下,参考搭建环境. 1.安装brew,安装介绍:https://jingyan.baidu.com/article/fec7a1e5ec3034 ...
- 在MAC上安装虚拟机搭建Ubuntu开发环境
由于工作需要,需要在LINUX环境搭建服务器,但是工作中使用的是MAC系统,只好用虚拟机来搭建LINUX服务器环境.下面记录介绍一下搭建步骤以供需要的人参考使用. 下载准备 虚拟机使用VMWare ...
随机推荐
- C# richTextBox编辑器
附件:http://files.cnblogs.com/xe2011/CSHARP_RichTextBoxEditor.rar 完整的转到这里 http://www.cnblogs.com/xe201 ...
- SOA是什么
一.SOA是什么 SOA的全称是Service-Oriented Architecture,面向服务架构.是一种架构,不是一种具体的开发技术. 要真正理解什么是SOA需要从软件开发的技术发展史 ...
- 常用命令-eval简析
www.2cto.com 1. 工作原理及用法 用法:eval command-line 原理:eval主要用在对参数的特殊处理上面的,一般的命令行,shell处理参数就只执行一遍,像转义和变 ...
- 打开PPT 提示安装,非要取消才能显示PPT
自从安装VS2008后,一打开ppt文件,就开始了配置VS2008的过程. 配置完了,下回也还提示安装. 解决方案: PowerPoint选项->加载项->Chinese Translat ...
- 读者汇app项目案例源码
这款app是我花一周左右时间做出来的,一款阅读笑话,段子,糗事,脑筋急转弯,神回复,语录,谜语等的休闲娱乐app,用户除了可以浏览他人发布的内容外,自己也可以发布相关内容,和其他人一同分享有趣的内容, ...
- 黑马程序员-IO(二)
------Java培训.Android培训.iOS培训..Net培训.期待与您交流! ------- 装饰设计模式: 当想要对已有对象进行功能增强时.可以定义类,将已经有的类传入,基于已经有的功能, ...
- HTTP状态吗汇录
页面Http状态查询工具说明 建议直接Ctrl+F来查找状态码 如果向您的服务器发出了某项请求要求显示您网站上的某个网页,那么,您的服务器会返回 HTTP 状态代码以响应该请求. 如果向您的服务器发出 ...
- /etc目录深入理解
/etc This is the nerve center of your system, it contains all system related configuration files in ...
- 【转】发布iOS应用程序到苹果APP STORE完整流程
原文: http://www.cnblogs.com/JuneWang/p/3850859.html 可以为每个app上传5张截图,虽然至少需要上传一张,可能很少有人会只上传一张图片.另外,你还需要分 ...
- 校省选赛第一场A题Cinema题解
今天是学校省选的第一场比赛,0战绩收工,死死啃着A题来做,偏偏一直WA在TES1. 赛后,才发现,原来要freopen("input.txt","r",stdi ...