mac os 10.10.3 安装rails & Nokogiri
来源:互联网 发布:网络匿名短信免费版 编辑:程序博客网 时间:2024/06/08 23:03
终端输入
sudo gem install rails -V
报错
/Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2/test/xslt/test_custom_functions.rb
/Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2/test/xslt/test_exception_handling.rb
/Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2/test_all
Building native extensions. This could take a while...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/ext/builder.rb:51: warning: Insecure world writable dir /usr/bin in PATH, mode 040777
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... yes
checking for iconv... no
-----
libiconv is missing. Please locate mkmf.log to investigate how it is failing.
-----
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/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
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
Building has failed. See above output for more information on the failure.
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.6.2 for inspection.
直接安装Nokogir
按照官网步骤
#sudo gem install nokogiri
同样的错误,失败
#sudo gem install nokogiri -- --use-system-libraries
同样的错误,失败
#sudo gem install nokogiri -- \
--use-system-libraries \
--with-xml2-lib=/usr/lib \
--with-xml2-include=/usr/include/libxml2 \
--with-xslt-lib=/usr/lib \
--with-xslt-include=/usr/include/libxslt
成功
结论,没有找到libxml2和libxslt的头文件和库的路径。
- mac os 10.10.3 安装rails & Nokogiri
- Ruby on Rails mac os安装
- Mac OS X 10.9 安装 rails
- Rails 安装nokogiri时libxml2报错问题解决
- mac os x 10.5.8上安装ruby on rails
- Mac OS X上安装JRuby on Rails和sqlite3
- mac os 上 安装 rails 连接 mysql server
- 在Centos6.3上安装Nokogiri
- Setup Ruby On Rails on Mac OS X 10.10 Yosemite
- mac os 10.10 Yosemite 安装
- mac os 10.7.3 安装
- 安装nokogiri错误解决
- Mac上安装Rails
- Mac系统安装Rails
- mac gem install nokogiri error
- 在Mac OS X Marvericks 10.9上安装ruby and rails
- Mac os 如何快速正确的安装 Ruby, Rails 运行环境
- gem install nokogiri 安装错误
- js中的数组
- [LeetCode] Longest Valid Parentheses
- C++ 对象的内存布局
- springMVC+mongodb整合(morphia)
- 安卓键盘属性windowSoftInputMode透析
- mac os 10.10.3 安装rails & Nokogiri
- ssh无密码登录
- poj 2386 Lake Counting
- 为什么需要拷贝(复制)构造函数
- Oracle 创建作业JOB的例子
- 多种方式实现JS调用后台方法进行数据交互
- 典雅立面设计 古典风范与个人独特风格
- JavaScript使用对象注意
- Netty初探-编解码技术