Error installing Ruby on Rails 4.0.0 - compilation with atomic_reference.c error

I am trying to install Rails 4.0.0 according to the tutorial , but I am getting the following error:

gez@akira :~$ gem install rails --version 4.0.0 --no-ri --no-rdoc Fetching: i18n-0.6.4.gem (100%) Successfully installed i18n-0.6.4 Fetching: multi_json-1.7.7.gem (100%) Successfully installed multi_json-1.7.7 Fetching: tzinfo-0.3.37.gem (100%) Successfully installed tzinfo-0.3.37 Fetching: atomic-1.1.10.gem (100%) Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /home/gez/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb creating Makefile make compiling atomic_reference.c linking shared-object atomic_reference.so make install /usr/bin/install -c -m 0755 atomic_reference.so /home/gez/.rvm/gems/ ruby-2.0.0-p247@railstut _rails_4_0/gems/atomic-1.1.10/lib/home/gez/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-linux /usr/bin/install: cannot create regular file `/home/gez/.rvm/gems/ ruby-2.0.0-p247@railstut _rails_4_0/gems/atomic-1.1.10/lib/home/gez/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-linux': No such file or directory make: *** [install-so] Error 1 Gem files will remain installed in /home/gez/.rvm/gems/ ruby-2.0.0-p247@railstut _rails_4_0/gems/atomic-1.1.10 for inspection. 

It seems that the two paths have become merged, but are not new to Rails / Ruby. I am not sure how to proceed. All of the previous steps seem to have completed successfully without errors.

My system is Linux Mint x86_64 (based on Debian).

+1
source share
5 answers

Rails 4.0 seems to need RubyGems 2.0.3, so the command

 gem update --system 2.0.3 

must work. I updated the tutorial accordingly.

+6
source

Had almost the same problem, sent an answer to this question about how I finally got it for installation.

Mostly:

  • gem update --system (updated to 2.0.3)
  • Gem update
  • gem install rails (no version 4.0.0 is now used by default)

Good luck.

+2
source

I had the same problem today. I was able to fix this, but I'm not quite sure what caused the problem initially, or even how I solved it.

What I know finally works after I upgrade the ruby ​​stones to the latest version, instead of getting version 2.0.0, as the tutorial suggests.

 gem update 

instead

 gem update --system 2.0.0 

Give it a try and let me know if that helps.

+1
source

if you install ruby ​​/ rails via rvm always run

 rvm requirements 

after installing rvm before trying to install ruby ​​and rails

0
source

to try

 gem install rails --no-ri --no-rdoc 

Without a version, he is going to install the latest version of rails, at this time rails 4.0.0. Why don't you have documentation ???

You can also try this.

0
source

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


All Articles