6

I am building my Ruby enviroment using rvm 1.23.16 (stable) and could see that Ruby passed of ruby 2.0.0-p247 to ruby-2.0.0-p353, and now if try to install Rails 4.0 rails gem install rails -v 4.0.0 or gem install rails -v 4.0.0 --no-rdoc --no-ri. (for ommit the documentation of installation process, like I did learn recently) I have the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

    /home/llarruda/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
compiling atomic_reference.c
linking shared-object atomic_reference.so

make "DESTDIR=" install
/usr/bin/install -c -m 0755 atomic_reference.so ./.gem.20131122-9599-8hv76z
installing default atomic_reference libraries


Gem files will remain installed in /home/llarruda/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14 for inspection.
Results logged to /home/llarruda/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14/ext/gem_make.out

The content of ~/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14/ext/gem_make.out.

/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
compiling atomic_reference.c
linking shared-object atomic_reference.so

make "DESTDIR=" install
/usr/bin/install -c -m 0755 atomic_reference.so ./.gem.20131122-9599-8hv76z
installing default atomic_reference libraries

See the ~/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14/ext/mkmf.log:

"gcc -o conftest -I/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/include/ruby-2.0.0/x86_64-linux -I/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/include/ruby-2.0.0/ruby/backward -I/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/include/ruby-2.0.0 -I.     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration  -fPIC conftest.c  -L. -L/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -Wl,-R/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic     -Wl,-R -Wl,/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -L/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -lruby  -lpthread -lrt -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"gcc -o conftest -I/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/include/ruby-2.0.0/x86_64-linux -I/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/include/ruby-2.0.0/ruby/backward -I/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/include/ruby-2.0.0 -I.     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration  -fPIC conftest.c  -L. -L/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -Wl,-R/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic     -Wl,-R -Wl,/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -L/home/llarruda/.rvm/rubies/ruby-2.0.0-p353/lib -lruby  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration  -fPIC -lpthread -lrt -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main() {
4:   int i = 1;
5:   __sync_bool_compare_and_swap(&i, 1, 4);
6:   return (i != 4);
7: }
/* end */

./conftest

I have installed the same way with all gems are that environment can need, this occurred starting from update of the Ruby version.

Leandro Arruda
  • 466
  • 6
  • 16
  • Can you post the contents of `/home/llarruda/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14/ext/gem_make.out` ? – joews Nov 22 '13 at 18:52
  • 2
    http://stackoverflow.com/questions/17385535/error-installing-ruby-on-rails-4-0-atomic-reference-c-error-71 ? – Steve Klabnik Nov 22 '13 at 21:07
  • @SteveKlabnik I already passed through that, and this content which you did send me was very useful,however in this time with the most recent update version of Ruby seems a little different. some gems in a actual state, apparently, do not have use for integration the new version of Ruby and the Rails 4.0.0 or 4.0. 1. I will keep investigating, any results on my part or the Ruby on Rails community I send a smoke sign for you. Thanks. – Leandro Arruda Nov 22 '13 at 23:07
  • @mpapis I've already put in the body question. – Leandro Arruda Nov 23 '13 at 01:03
  • sorry meant to ask what is in `~/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14/ext/mkmf.log` – mpapis Nov 23 '13 at 01:06
  • @mpapis Oh, sure. I did. Thanks by interesting of all. – Leandro Arruda Nov 23 '13 at 07:15
  • Well, apparently, it was a problem with some gem obtained from the RVM. Understandable because as the version 2.0.0-P353 was released yesterday, there's so many requirements to integrate.Today I simply run the command, without any modification, and all occurred normally now. This time I could see all process. – Leandro Arruda Nov 23 '13 at 11:18
  • it was problem in compilation, maybe it happens only on your linux and it requires running `gem install atomic` two times? try removing the gem and installing again. btw. what linux do you have? – mpapis Nov 23 '13 at 16:36
  • @mpapis I Did the procedure first in Elementary Luna, after I did on Debian 7.2 and Ubuntu 12.04. Happened the same thing, but one day after all work well without need unistall anything. I tried in the same say day that ruby-2.0.0-p353 version was release, i think that some gems was passing for updates. If happen again I will use your hint. – Leandro Arruda Nov 26 '13 at 15:17
  • Try: `gem update rubygems-bundler` then `gem update --system` then `gem update` then `gem install rails -V=4.0.2` ? – Surya Dec 21 '13 at 09:51

1 Answers1

1

Try

gem update --system

and then reinstall again...............

Bharat soni
  • 2,686
  • 18
  • 27
  • This is a legitimate answer, regardless whether it worked for everyone. I think Lajos was a bit too quick on the "Recommend Delete" button. – Paul Richter Jan 08 '14 at 16:26