无法捆绑安装nokogiri错误RoR教程

时间:2014-06-26 23:04:42

标签: ruby-on-rails ruby

我第一次学习RoR而且我被困在本教程的这一部分 http://www.railstutorial.org/book/static_pages#sec-first_tests

特别是在我应该配置这个gem文件的开头。我知道还有其他更多的最新版本,但我试图按照这个特定版本的教程。我的gemfile与链接中显示的相同。

当我跑步时:bundle install --without production我得到:

Bundler could not find compatible versions for gem "sprockets-rails":
  In snapshot (Gemfile.lock):
    sprockets-rails (2.1.3)

  In Gemfile:
    rails (= 4.0.5) ruby depends on
      sprockets-rails (~> 2.0.0) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

我试过bundle update,但我得到了:

An error occurred while installing nokogiri (1.6.2.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.

我尝试了gem install nokogiri -v '1.6.1',但得到了:

ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

    /Users/bradfordli/.rvm/rubies/ruby-2.0.0-p481/bin/ruby 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.

0 个答案:

没有答案