Error installing Ruby on Rails 4.0 - atomic_reference.c Error 71

I get an error when I try to install rails (more precisely, 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 

Basically, I just follow the guide to rails (for rails 4.0 and ruby ​​2.0, here) and look like wall bumps here, unfortunately, I can not find much information about what is happening here.

I found this question and completed both sentences in the answer with the same result.

+6
source share
2 answers

There was the same problem coming from the same textbook. Got it to work after this post . I chose several commands to compare gemsets with the message, but what seems to fix the problem was

  • gem update --system (without "2.0.0" from the tutorial, updated me to 2.0.3)
  • Gem update
  • gem install rails (again without version)

And finally, it is installed correctly

+14
source

So, in my case, what seems unsuccessful is that INSTALL =. / Install is installed in the Makefile and not. / install. I edited the Makefile to take out. /, and then created a local specification with

 gem spec ../../../cache/atomic-1.1.14.gem --ruby > ../../../specifications/atomic-1.1.14.gemspec 

subsequent

 gem install rails 

succeeded, but I have no idea if it ruined my rail example.

0
source

Source: https://habr.com/ru/post/948401/


All Articles