【发布时间】:2014-04-23 01:12:44
【问题描述】:
我已经安装了一个新的 Rails 项目,如下所示:
$ rails new site
它执行并到达:
bundle install
但是当它似乎尝试安装依赖项时出现此错误
Gem::Ext::BuildError: 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
Gem files will remain installed in /Users/mikeguppy/.bundler/tmp/26234/gems/atomic-1.1.16 for inspection.
Results logged to /Users/mikeguppy/.bundler/tmp/26234/extensions/universal-darwin-13/2.0.0/atomic-1.1.16/gem_make.out
An error occurred while installing atomic (1.1.16), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.16'` succeeds before bundling.
然后我尝试使用以下方法独立安装 atomic:
gem install atomic
又一次没有运气。
我在 Mac OS 10.9.2 上运行 Ruby 2.0
任何帮助将不胜感激!
【问题讨论】:
-
你的 Rails 版本是什么?
rails -v -
@Leito 我按照下面的答案卸载了原子。现在我没有 rails :/ 所以没有 -v 我害怕
-
@Leito 现在我无法安装 rails
-
我确定问题现在不同了。您需要提供更多信息(不要只说“不起作用”/“我不能”)以便我们提供帮助。不鼓励在 cmets 中聊天,因此要么发布有关安装 rails 的新问题,要么创建一个聊天室供我们进一步讨论。
标签: ruby-on-rails ruby