加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 新的Rails项目:’bundle install’无法在gemf

发布时间:2020-12-17 03:38:02 所属栏目:百科 来源:网络整理
导读:我安装了一个新的rails项目,如下所示: $rails new site 它执行并到达: bundle install 但是当我看来尝试安装依赖项时,我得到了这个错误 Gem::Ext::BuildError: ERROR: Failed to build gem native extension./System/Library/Frameworks/Ruby.framework/Ve
我安装了一个新的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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读