2016-02-14 48 views
1

我是Ruby on Rails的新手。當我嘗試安裝最新版本的Rails時,出現以下錯誤。你們能幫我嗎?我在安裝導軌時出現錯誤

Building native extensions. This could take a while... 
ERROR: Error installing rails: 
    ERROR: Failed to build gem native extension. 

    /Users/stephensamkinston/.rbenv/versions/2.3.0-dev/bin/ruby extconf.rb 
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. 
Using mini_portile version 2.0.0 
checking for iconv.h... yes 
checking for gzdopen() in -lz... yes 
checking for iconv... yes 
************************************************************************ 
IMPORTANT NOTICE: 

Building Nokogiri with a packaged version of libxml2-2.9.2 
with the following patches applied: 
    - 0001-Revert-Missing-initialization-for-the-catalog-module.patch 
    - 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch 
    - 0003-Stop-parsing-on-entities-boundaries-errors.patch 
    - 0004-Cleanup-conditional-section-error-handling.patch 
    - 0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch 
    - 0006-Another-variation-of-overflow-in-Conditional-section.patch 
    - 0007-Fix-an-error-in-previous-Conditional-section-patch.patch 
    - 0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch 
    - 0009-Updated-config.guess.patch 
    - 0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch 
    - 0011-Avoid-extra-processing-of-MarkupDecl-when-EOF.patch 
    - 0012-Avoid-processing-entities-after-encoding-conversion-.patch 
    - 0013-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch 
    - 0014-CVE-2015-5312-Another-entity-expansion-issue.patch 
    - 0015-Add-xmlHaltParser-to-stop-the-parser.patch 
    - 0016-Detect-incoherency-on-GROW.patch 
    - 0017-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch 
    - 0018-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch 
    - 0019-Do-not-print-error-context-when-there-is-none.patch 
    - 0020-xmlStopParser-reset-errNo.patch 
    - 0021-Reuse-xmlHaltParser-where-it-makes-sense.patch 

回答

1

看來你沒有構建工具安裝

通過運行以下命令

1)sudo apt-get install build-essential

2)sudo apt-get install nodejs

現在安裝裝配導軌

安裝構建toosl

3)gem install rails

+0

我沒有apt-get.could你給我提供的命令 – user578386

+0

你在使用什麼操作系統? –

+0

mac OSX yosemite 10.10.5 – user578386