小牛10.9麻烦安装宝石

时间:2013-10-25 19:46:31

标签: ruby gem jekyll osx-mavericks

我一直在努力在我的mac上安装jekyll,不太了解ruby或配置/调试这些消息。

运行“sudo gem install jekyll”时,我得到以下内容

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

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
make: *** No rule to make target `/include/universal-darwin13/ruby/config.h', needed by `porter.o'.  Stop.


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2/ext/gem_make.out

“gcc --version”返回以下内容:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

2 个答案:

答案 0 :(得分:2)

使用此命令:

$ sudo xcode-select -r 

然后

$ sudo gem install jekyll

希望这对你有所帮助。

答案 1 :(得分:0)

除了升级xcode之外,正如rayrashmi建议的那样,你必须实际打开它,以便正确安装命令行工具。

(我假设你在升级到mavericks之前从xcode安装了命令行工具,如果你没有它们在Preferences → Downloads → Componentsofficial info here之下。)

然后,如果您还没有升级宝石,请安装jekyll和您正在使用的任何其他库,如颜料。

正如他们所说,“为我工作。”