在OS X 10.9.2上安装RedCloth(4.2.9)时出错

时间:2014-03-26 16:21:54

标签: ruby github jekyll

我尝试使用enter link description here在页面上安装Jekyll。 安装RedCloth(4.2.9)时,该过程停止:“在捆绑之前确保gem install RedCloth -v '4.2.9'成功。”

以下结果(由于此问题中的网址限制,我在H中更改了https)。 我运行OS X 10.9.2

第1步=​​确定

mikea:mego mikea$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

第2步=确定

mikea:mego mikea$ sudo gem install bundler
Password:
Successfully installed bundler-1.5.3
Parsing documentation for bundler-1.5.3
1 gem installed

第3步= NOK

mikea:mego mikea$ bundle install
Fetching gem metadata from H://rubygems.org/.......
Fetching additional metadata from h://rubygems.org/..

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-cflags=-w
checking for main() in -lc... yes
creating Makefile

make "DESTDIR="
compiling redcloth_attributes.c
compiling redcloth_inline.c
compiling redcloth_scan.c
linking shared-object redcloth_scan.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [redcloth_scan.bundle] Error 1


Gem files will remain installed in /Users/mikea/.bundler/tmp/25125/gems/RedCloth-4.2.9 for inspection.
Results logged to /Users/mikea/.bundler/tmp/25125/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
An error occurred while installing RedCloth (4.2.9), and Bundler cannot
continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.

2 个答案:

答案 0 :(得分:2)

我通过使用brew安装rbenv来解决这个问题,然后通过rbenv安装ruby 2.1.1。最后将ruby版本更改为2.1.1。这是命令:

$brew update
$brew install rbenv
$rbenv install 2.1.1
$rbenv global 2.1.1

退出。现在你可以试试你的3步了。

答案 1 :(得分:0)

我没有使用hue的答案来安装带有brew的rbenv。也许你可以使用它。 我通过使用终端解决了问题,首先转到站点中的文件夹,然后键入:

jekyll serve --watch --baseurl ""