安装 Ruby on Rails 4.0 时出错 - atomic_reference.c 错误 71 [英] Error installing Ruby on Rails 4.0 - atomic_reference.c Error 71

查看:36
本文介绍了安装 Ruby on Rails 4.0 时出错 - atomic_reference.c 错误 71的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试安装 rails(或更具体地说,atomic)时遇到错误.

I am getting an error when trying to install rails (or more specifically, 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,在这里看到) 并在这里碰壁,不幸的是,无法找到关于这里发生的事情的太多信息.

I'm basically just following the rails tutorial (for rails 4.0 and ruby 2.0, seen here) and have kind of hit a wall here, unfortunately, unable to find much info on what's happening here.

我发现了这个问题并按照答案中的两个建议得到相同的结果.

I found this question and followed both suggestions in the answer with the same result.

推荐答案

遇到了同样的问题,来自同一个教程.在这篇文章之后开始工作.运行了一些命令来比较 gemsets 和帖子,但似乎解决问题的是

Had the very same problem, coming from that same tutorial. Got it to work following this post. Ran a few command to compare gemsets with the post but what seem to fix the problem was

  • gem update --system(没有教程中的2.0.0",将我更新到 2.0.3)
  • 宝石更新
  • gem install rails(同样没有指定版本)

最后安装正确

这篇关于安装 Ruby on Rails 4.0 时出错 - atomic_reference.c 错误 71的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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