小编gda*_*vis的帖子

在OSX 10.10 Yosemite上安装Nokogiri

我最近升级到10.10优胜美地测试版,但是我在安装Nokogiri时遇到了麻烦.我正在使用RVM和Ruby 1.9.3.我也按照这里的步骤尝试按照Nokogiri主页上的说明进行操作.

我通过自制程序安装了libxml2(2.9.1)和libxslt(1.1.28),并尝试使用我的Xcode 5安装和Xcode 6 beta中的命令行工具.

gem install nokogiri -v '1.5.5'
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

        /Users/grantdavis/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
checking for libxml/parser.h... *** 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
    --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 …
Run Code Online (Sandbox Code Playgroud)

ruby gem homebrew nokogiri bundler

53
推荐指数
7
解决办法
3万
查看次数

在Xcode 4.4和OSX 10.8安装之后 - 安装libv8时'无法构建gem native extension'

我最近将OSX升级到Mountain Lion(10.8)和Xcode(4.4),并在试图让我的rails环境正常工作时遇到问题.我开始运行bundle install并在安装libv8库时遇到错误.下面是完整错误的粘贴.我一直在搜索并寻找类似的问题,但到目前为止我在stackoverflow上找到的并没有应用于我的问题.以下是我迄今为止尝试过的几件事但无济于事:

  • 安装Xcode命令行工具
  • 安装MySQL
  • 安装X11
  • 通过gemfile安装不同版本的libv8

现在我的问题似乎超出了我的红宝石技能.如果有人对我可以尝试或遇到类似问题有一些想法,我会很乐意帮助您.谢谢!

这是我的gemfile的样子:

source 'https://rubygems.org'

gem 'rails', '3.2.6'
gem 'bundler'
gem 'rake'
gem 'sqlite3'
gem 'haml'
gem 'nokogiri'
gem 'whenever'
gem 'mysql'
gem 'mysql2'
gem 'jquery-rails'
gem 'capistrano'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3' …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails

7
推荐指数
1
解决办法
8106
查看次数

标签 统计

ruby ×2

bundler ×1

gem ×1

homebrew ×1

nokogiri ×1

ruby-on-rails ×1