我目前正在尝试在新Mac上安装Rails。
当我尝试安装gem" atomic"。
时出错我已经尝试过在网上找到的所有解决方案:安装xcode,尝试更改ruby的版本等,但它永远不会有效。
我的配置: OS X 10.9.2
xcode 5.1
ruby 2.0.0p247 宝石2.2.2
当我输入" xcode-select -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 :(得分:0)
我建议采取以下步骤:
卸载atomic
gem
gem uninstall atomic
重新安装atomic
gem
gem install atomic
安装rails
gem install rails