gpt4 book ai didi

ruby-on-rails - 在 MAC OS X 10.9.2 上安装 rails 时遇到问题

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

在 mac 上安装 rails 时遇到问题,想知道是否有人可以帮助我:

dannys-mbp-2:~ Danny1$ sudo gem install rails

构建 native 扩展。这可能需要一段时间...错误:安装 rails 时出错: 错误:无法构建 gem native 扩展。

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for libkern/OSAtomic.h... yes
creating Makefile

使“DESTDIR=”干净

制作

"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 /Library/Ruby/Gems/2.0.0/gems/atomic-1.1.16 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/atomic-1.1.16/gem_make.out

最佳答案

我正在处理这个问题,最后偶然发现了 Bug 报告。我使用了以下命令,它对我有用:

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install rails

官方报告:https://bugs.ruby-lang.org/issues/9624

关于ruby-on-rails - 在 MAC OS X 10.9.2 上安装 rails 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22551028/

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