2014-03-24 64 views
0

我目前正試圖在新的Mac上安裝Rails。(另一種)安裝Rails時出錯

我嘗試安裝gem「atomic」時出現錯誤。

我已經嘗試了我在網上找到的每個解決方案:安裝xcode,嘗試更改ruby的版本等,但它永遠不會工作。

我的配置: OS X 10.9.2

的Xcode 5.1

紅寶石2.0.0p247 寶石2.2.2

當我輸入 「的Xcode選-p」,我得到: /Applications/Xcode.app/Contents/Developer

期間原子

安裝,所述錯誤是:

"ERROR: Error installing atomic: 
    ERROR: Failed to build gem native extension. 

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for libkern/OSAtomic.h... yes 
creating Makefile 

make "DESTDIR=" clean 

make "DESTDIR=" 
compiling atomic_reference.c 
atomic_reference.c:57:59: warning: incompatible pointer types passing 'void **' to parameter of type 'volatile int64_t *' (aka 'volatile long long *') [-Wincompatible-pointer-types] 
    if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) { 
                  ^~~~~~~~~~~~~~~ 
/usr/include/libkern/OSAtomic.h:507:93: note: passing argument to parameter '__theValue' here 
bool OSAtomicCompareAndSwap64(int64_t __oldValue, int64_t __newValue, volatile int64_t *__theValue); 
                          ^
1 warning generated. 
linking shared-object atomic_reference.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: *** [atomic_reference.bundle] Error 1 

make failed, exit code 2" 

不要猶豫,要求更多的相關信息, 非常感謝

+0

我已經在此之前見過類似的問題。已經搜索過了嗎? – emaillenin

+0

[Ruby Gem install Json在Mavericks和Xcode 5.1上失敗 - 未知參數:'-multiply \ _definedsuppress'](http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on -mavericks-and-xcode-5-1-unknown-argument-mul) – Nakilon

回答

0

我建議以下步驟:

  • 卸載atomic寶石

    gem uninstall atomic

  • 重安裝atomic寶石

    gem install atomic

  • 安裝rails

    gem install rails

+0

@ user3456284我的答案解決了你的問題嗎? –