vendredi 6 novembre 2015

I can't install Rails no matter what I try on Ubuntu 14.04 [duplicate]

This question already has an answer here:

I have been sitting for the past 2 hours trying to install rails. I've been following this link http://ift.tt/1mZIo0v as part of the Odin Project. I have scoured Google trying everything to install rails but nothing works. I keep getting this error when I try to gem install or sudo gem install or anything really.


murad@murad-Lenovo-Z50-70:~$ gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension.

/home/murad/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151106-28349-4885yq.rb extconf.rb

checking if the C compiler accepts ... * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/murad/.rvm/rubies/ruby-2.2.3/bin/$(RUBY_BASE_NAME) --help --clean /home/murad/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /home/murad/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:571:inblock in try_compile' from /home/murad/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:522:in with_werror' from /home/murad/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:571:intry_compile' from extconf.rb:80:in nokogiri_try_compile' from extconf.rb:87:inblock in add_cflags' from /home/murad/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:619:in with_cflags' from extconf.rb:86:inadd_cflags' from extconf.rb:337:in `'

extconf failed, exit code 1

Gem files will remain installed in /home/murad/.rvm/gems/ruby-2.2.3/gems/nokogiri-1.6.6.2 for inspection. Results logged to /home/murad/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/nokogiri-1.6.6.2/gem_make.out

Aucun commentaire:

Enregistrer un commentaire