Probleme mit Ruby on Rails Teil 1

320
railsissues

Ich habe Rails auf meinem Ubuntu-Rechner installiert und alles scheint zu funktionieren, abgesehen von meinen Versuchen, den Schienen-Server zu starten. Es wird ein Fehlercode zurückgegeben, der besagt, dass nokogiri nicht installiert ist. Ich benutze 'gem install nokigiri' und es gibt folgendes zurück:

 foo@foo:~/myapp$ sudo gem install nokogiri -v '1.8.5' --source 'https://rubygems.org/' Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension.  current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.8.5/ext/nokogiri /usr/bin/ruby2.3 -r ./siteconf20181102-5118-1bvzrgj.rb extconf.rb checking if the C compiler accepts ... yes Building nokogiri using packaged libraries. Using mini_portile version 2.3.0 checking for gzdopen() in -lz... no zlib is missing; necessary for building libxml2 *** 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=$/include --with-opt-lib --without-opt-lib=$/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/$(RUBY_BASE_NAME)2.3 --help --clean --use-system-libraries --enable-static --disable-static --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=$/include --with-zlib-lib --without-zlib-lib=$/lib --enable-cross-build --disable-cross-build  To see why this extension failed to compile, please check the mkmf.log which can be found here:  /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.8.5/mkmf.log  extconf failed, exit code 1  Gem files will remain installed in /var/lib/gems/2.3.0/gems/nokogiri-1.8.5 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri- 1.8.5/gem_make.out 

Ich bin neu bei Ruby / Rails und weiß nicht genau, was Sie mit dieser Fehlermeldung tun sollen.

0
Versuchen Sie, build-essential zu installieren. Installieren Sie apt install-essential und wiederholen Sie dann die Installation. Einer meiner Kollegen, der Ubuntu leitete, schlug dasselbe Problem und berichtete, dass dies das Problem für ihn gelöst habe Enigman vor 5 Jahren 0

0 Antworten auf die Frage