ruby - How to use gem to install Rails on Ubuntu -


the error message:

building native extensions.  take while... error:  error installing rails:   error: failed build gem native extension.      /usr/bin/ruby2.1 -r ./siteconf20150328-1540-hff2f0.rb extconf.rb checking if c compiler accepts ... *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers.  check mkmf.log file more details.  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=/usr/bin/ruby2.1   --help   --clean /usr/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': compiler failed generate executable file. (runtimeerror) have install development tools first.   /usr/lib/ruby/2.1.0/mkmf.rb:571:in `block in try_compile'   /usr/lib/ruby/2.1.0/mkmf.rb:522:in `with_werror'   /usr/lib/ruby/2.1.0/mkmf.rb:571:in `try_compile'   extconf.rb:80:in `nokogiri_try_compile'   extconf.rb:87:in `block in add_cflags'   /usr/lib/ruby/2.1.0/mkmf.rb:621:in `with_cflags'   extconf.rb:86:in `add_cflags'   extconf.rb:337:in `<main>'  extconf failed, exit code 1  gem files remain installed in /var/lib/gems/2.1.0/gems/nokogiri-1.6.6.2 inspection. results logged /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/nokogiri-1.6.6.2/gem_make.out 

configurations:

  1. ubuntu 14.10 (gnu/linux 3.16.0-23-generic x86_64)
  2. gcc (ubuntu 4.9.1-16ubuntu6) 4.9.1
  3. ruby 2.1.2p95 (2014-05-08) [x86_64-linux-gnu]

after upgrading rails 4.2.4 on ubuntu 14.04 using rvm needed this:

sudo apt-get install libgmp-dev 

or

sudo apt-get install libgmp3-dev 

full stacktrace: http://ruby-on-rails-eq8.blogspot.co.uk/2015/10/solving-ubuntu-1404-ruby-c-dependancy.html


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -