gpt4 book ai didi

ruby-on-rails - 新 Rails 项目 : 'bundle install' can't install rails in gemfile

转载 作者:数据小太阳 更新时间:2023-10-29 07:13:35 24 4
gpt4 key购买 nike

我已经像这样安装了一个新的 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


如有任何帮助,我们将不胜感激!

最佳答案

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

关于ruby-on-rails - 新 Rails 项目 : 'bundle install' can't install rails in gemfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22461011/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com