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 ...
随机推荐
- 使用json-lib进行Java和JSON之间的转换【转载】
1. json-lib是一个java类库,提供将Java对象,包括beans, maps, collections, java arrays and XML等转换成JSON,或者反向转换的功能. 2. ...
- android自定义TabWidget
在做项目的时候,需要用到这个选项卡,刚开始看了系统的tabwidget,囧了,底边有黑线不说,还不美观,扒了好多的网页发现前辈做的能够满足自己的需求,将代码修改了下,就能用喽,伟人说过,站在前辈的肩膀 ...
- MYSQL 学习笔记1 -----mysqladmin -uroot -p status|extended-status
root@server1 ~]# mysqladmin -uroot -p status -i -r extended-status|grep Handler_commit Enter passwor ...
- (转载)myeclipse项目名称重命名
myeclipse项目名称重命名 实例1 今天晚上在做一个jsp唱片显示的实例,myeclipse项目名称原本想写music结果写成了musci.这就需要项目名称的重命名,单纯的使用 “重构--> ...
- POJ 1845 Sumdiv(因子分解+快速幂+二分求和)
题意:给你A,B,让求A^B所有的因子和模上9901 思路:A可以拆成素因子的乘积: A = p1^x1 * p2^x2 *...* pn^xn 那么A^B = p1^(B*x1) * p2^(B*x ...
- js中 的这些距离你知道吗?
- [转]eclipse github 提交代码
1 git add2 git commit3 git pull (会产生冲突) 分成自动合并和手动合并4 处理冲突的文件 5 git push 本次commit 我用的是Eclipse的插件EGit ...
- Java-Android 之Hello World
1.新建一个Android Project 2.2版本的 修改values下面的内容,为: <?xml version="1.0" encoding="utf-8& ...
- 将decimal类型的数值后面的0和.号去掉
今天在群里面看到有朋友在问如下的需求,想到以前在写项目时也遇到这种处理数值的需求,所以写一个例子贴在博客里. 需求:在许多显示货币值时,可能需要截取掉后面的0,显示小数值或者整型值. 举例:(1)数据 ...
- CATransform3DRotate 实现左右,上下翻转效果
CGFloat m34 = 800; CGFloat value = -40://(控制翻转角度) CGPoint point = CGPointMake(0.5, 0.5);//设定翻转时的 ...