gpt4 book ai didi

ruby-on-rails - 在Ruby on Rails 4.0上安装时发生错误-atomic_reference.c错误71

转载 作者:行者123 更新时间:2023-12-04 13:27:47 27 4
gpt4 key购买 nike

尝试安装rails(或更具体地说,是atomic)时出现错误。

Building native extensions.  This could take a while... ERROR:  Error installing rails:     ERROR: Failed to build gem native extension.

/Users/dima/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb creating Makefile

make compiling atomic_reference.c atomic_reference.c:50:9: warning: implicit declaration of function 'OSAtomicCompareAndSwap64' is invalid in C99 [-Wimplicit-function-declaration]
if (OSAtomicCompareAndSwap64(expect_value, new_value, &DATA_PTR(self))) {
^ 1 warning generated. linking shared-object atomic_reference.bundle

make install /usr/bin/install -c -m 0755 atomic_reference.bundle /Users/dima/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/atomic-1.1.10/lib/Users/dima/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-darwin12.4.0 install: /Users/dima/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/atomic-1.1.10/lib/Users/dima/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-darwin12.4.0: No such file or directory make: *** [install-so] Error 71


Gem files will remain installed in /Users/dima/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/atomic-1.1.10 for inspection. Results logged to /Users/dima/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/atomic-1.1.10/ext/gem_make.out

我基本上只是在关注rails教程(对于rails 4.0和ruby 2.0, seen here),在这里碰到了一堵墙,不幸的是,无法找到有关这里发生的事情的很多信息。

我找到了 this question,并在答案中遵循了两个建议,结果相同。

最佳答案

有同样的问题,来自同一个教程。按照this post进行工作。跑了几个命令来比较gemsets与帖子,但是似乎解决了这个问题的是

  • gem更新--system(没有教程中的“2.0.0”,将我更新为2.0.3)
  • gem更新
  • gem安装 rails (再次未指定版本)

  • 最后安装正确

    关于ruby-on-rails - 在Ruby on Rails 4.0上安装时发生错误-atomic_reference.c错误71,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17385535/

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