微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ruby-on-rails – 新的Rails项目:’bundle install’无法在gemfile中安装rails

我安装了一个新的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.

然后我尝试独立安装原子:

gem install atomic

再没有运气.

我在Mac OS 10.9.2上运行Ruby 2.0

任何帮助将非常感激!

解决方法

这对我有用: sudo ARCHFLAGS = -Wno-error = unused-command-line-argument-hard-error-in-future gem install rails

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐