尝试安装rails(或更具体地说,原子)时出现错误。
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,见这里)并且在这里碰壁了,不幸的是,无法找到关于这里发生的事情的太多信息。
我发现了这个问题,并按照答案中的两个建议得到了相同的结果。