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 ...
随机推荐
- ListView 选择多项目返回的之前的那项
当ListView多选时返回第一次选中的项索引 正确 定义一个变量 =-1 表示第一次没选任何一项 private int FirstSelectedIndex =-1; 更新Firs ...
- 【转】android的startActivityForResult学习心得
http://blog.csdn.net/yanzi1225627/article/details/7800529 从昨晚到现在终于调试通了一个startActivityForResult的例子,网上 ...
- way/XMPP
http://git.oschina.net/way/XMPP
- poj 3140 Contestants Division(树形dp? dfs计数+枚举)
本文出自 http://blog.csdn.net/shuangde800 ------------------------------------------------------------ ...
- hadoop错误Cannot load libsnappy.so.1 (libsnappy.so.1 cannot open shared object file No such file or directory)!
报如下错误 解决方法: 1.下载libsnappy.so.1(https://yunpan.cn/cSHRHTBJGVVX6 访问密码 c992) 2.上传到linux系统 3.安装 4.安装完成后 ...
- disable_functions(禁用php函数)
我们怎么来设置php禁止运行的函数呢? 其实,我们可以在php.ini文件进行设置,如图
- JDK中DNS缓存的分析
在JAVA中使用InetAddress.getByName(String host) 方法来获取给定hostname的IP地址.为了减少DNS解析的请求次数,提高解析效率,InetAddress中提供 ...
- Django 初探--Django的开发服务器及创建数据库(笔记)
1.Django的开发服务器 Django框架中包含一些轻量级的web应用服务器,开发web项目时不需再对其配置服务器,Django提供的内置服务器可以在代码修改时自动加载,从而实现网站的迅速开发. ...
- java web hello world
首先在eclipse 里面创建一个java 动态项目, 记住路径,这里是直接通过根目录直接访问的webContent目录下面 的文件, 创建好后 ,在本地配置Tomcat服务器, 将server加入到 ...
- 常见sql语句及复杂sql语句记录
1 将A表中的部分字段和B表中的部分字段作为C表的字段 SELECT a.name,b.age FROM (SELECT * from A) as a,(SELECT * from B) as ...