新 Rails 项目:'bundle install' 无法在 gemfile 中安装 rails [英] New Rails Project: 'bundle install' can't install rails in gemfile

查看:49
本文介绍了新 Rails 项目:'bundle install' 无法在 gemfile 中安装 rails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了一个新的 rails 项目,如下所示:

I have installed a new rails project like so:

$ rails new site

它执行并到达:

bundle install

但是当它似乎尝试安装依赖项时出现此错误

but then I get this error, when it appears to try installing a dependency

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:

I have then tried installing atomic independently with:

gem install atomic

再次没有运气.

我在 Mac OS 10.9.2 上运行 Ruby 2.0

I'm running Ruby 2.0 on Mac OS 10.9.2

任何帮助将不胜感激!

推荐答案

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

这篇关于新 Rails 项目:'bundle install' 无法在 gemfile 中安装 rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆