Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update of Ruby 2.0.0-p247 to Ruby-2.0.0-p353. Error to install Rails 4.0.0. on GNU/Linux

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.

like image 728
Leandro Arruda Avatar asked Nov 22 '13 17:11

Leandro Arruda


1 Answers

Try

gem update --system

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

like image 174
Bharat soni Avatar answered Oct 21 '22 01:10

Bharat soni