gezpage
gezpage

Reputation: 451

Error installing Ruby on Rails 4.0.0 - error compiling atomic_reference.c

I am attempting to install Rails 4.0.0 as per the tutorial, but 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 appears that two paths have become merged, but being new to Rails / Ruby I am unsure how to proceed. All previous steps appear to have completed successfully without errors.

My system is Linux Mint x86_64 (Debian based).

Upvotes: 1

Views: 4069

Answers (5)

mhartl
mhartl

Reputation: 1931

It looks like Rails 4.0 needs RubyGems 2.0.3, so the command

gem update --system 2.0.3

should work. I've updated the tutorial accordingly.

Upvotes: 6

Jean
Jean

Reputation: 5411

try

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

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

Also you could try this

Upvotes: 0

fengd
fengd

Reputation: 7579

if you are install ruby/rails through rvm, always run

rvm requirements

after you installed rvm, before you try install ruby and rails

Upvotes: 0

V.Coss
V.Coss

Reputation: 176

Had pretty much the same problem, posted an answer to this question on how I finaly got it to install.

Basically :

  • gem update --system (updated me to 2.0.3)
  • gem update
  • gem install rails (without the version, 4.0.0 seems to be the default now)

Good luck

Upvotes: 2

Travis Hairfield
Travis Hairfield

Reputation: 11

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

What I do know is it finally worked after I updated ruby gems to the latest version, instead of getting version 2.0.0 as the tutorial suggests.

gem update

instead of

gem update --system 2.0.0

Try that and let me know if it helps.

Upvotes: 1

Related Questions