2016-07-08 7 views
0

Ich habe Probleme beim Ausführen der Bundle-Installation auf meiner Konsole bei jedem Klonen eines Projekts. Aber ich habe keine Probleme, Bundle zu installieren, wenn ich mein eigenes Projekt mache.Installation nach dem Klonen nicht möglich

Wer weiß, was los ist?

Fetching gem metadata from http://rubygems.org/ 
Fetching version metadata from http://rubygems.org/ 
Fetching dependency metadata from http://rubygems.org/ 
Resolving dependencies.... 
Using rake 11.2.2 
Using i18n 0.7.0 
Using json 1.8.3 
Using minitest 5.9.0 
Using thread_safe 0.3.5 
Using builder 3.2.2 
Using erubis 2.7.0 
Using mini_portile2 2.1.0 
Using pkg-config 1.1.7 
Using rack 1.6.4 
Using mime-types-data 3.2016.0521 
Using arel 6.0.3 
Using coderay 1.1.1 
Using debug_inspector 0.0.2 
Using bundler 1.12.5 
Using coffee-script-source 1.10.0 
Using execjs 2.7.0 
Using thor 0.19.1 
Using concurrent-ruby 1.0.2 
Using multi_json 1.12.1 
Using sass 3.4.22 
Using tilt 2.0.5 
Using spring 1.7.2 
Installing sqlite3 1.3.11 with native extensions 

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    /Applications/rubystack-2.2.5-3/ruby/bin/ruby -r ./siteconf20160708-85177-1q2ntd0.rb extconf.rb 
checking for sqlite3.h... *** 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=/Applications/rubystack-2.2.5-3/ruby/bin/$(RUBY_BASE_NAME) 
    --with-sqlite3-dir 
    --without-sqlite3-dir 
    --with-sqlite3-include 
    --without-sqlite3-include=${sqlite3-dir}/include 
    --with-sqlite3-lib 
    --without-sqlite3-lib=${sqlite3-dir}/lib 
/Applications/rubystack-2.2.5-3/ruby/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 /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:587:in `try_cpp' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:1113:in `block in find_header' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:321:in `open' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:321:in `open' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:347:in `postpone' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:1112:in `find_header' 
    from extconf.rb:30:in `<main>' 

extconf failed, exit code 1 

Gem files will remain installed in /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.11 for inspection. 
Results logged to /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-10/2.2.0-static/sqlite3-1.3.11/gem_make.out 
Using turbolinks-source 5.0.0 
Using rdoc 4.2.2 
Using tzinfo 1.2.2 
Installing nokogiri 1.6.8 with native extensions 

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    /Applications/rubystack-2.2.5-3/ruby/bin/ruby -r ./siteconf20160708-85177-1kbeqyk.rb extconf.rb --with-opt-dir=/usr 
Using pkg-config version 1.1.7 
checking if the C compiler accepts -I/Applications/rubystack-2.2.5-3/common/include/ImageMagick -I/Applications/rubystack-2.2.5-3/common/include -I/Applications/rubystack-2.2.5-3/common/include/ImageMagick -I/Applications/rubystack-2.2.5-3/common/include -I/Applications/rubystack-2.2.5-3/sqlite/include -I/Applications/rubystack-2.2.5-3/varnish/include -I/Applications/rubystack-2.2.5-3/python/include -I/Applications/rubystack-2.2.5-3/mysql/include -I/Applications/rubystack-2.2.5-3/postgresql/include -I/Applications/rubystack-2.2.5-3/apache2/include -I/Applications/rubystack-2.2.5-3/subversion/include -I/Applications/rubystack-2.2.5-3/common/include -I/usr/include -m64... *** 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 
    --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=/Applications/rubystack-2.2.5-3/ruby/bin/$(RUBY_BASE_NAME) 
    --help 
    --clean 
/Applications/rubystack-2.2.5-3/ruby/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 /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:571:in `block in try_compile' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:522:in `with_werror' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:571:in `try_compile' 
    from extconf.rb:138:in `nokogiri_try_compile' 
    from extconf.rb:162:in `block in add_cflags' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:619:in `with_cflags' 
    from extconf.rb:161:in `add_cflags' 
    from extconf.rb:414:in `<main>' 

extconf failed, exit code 1 

Gem files will remain installed in /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.8 for inspection. 
Results logged to /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-10/2.2.0-static/nokogiri-1.6.8/gem_make.out 
Using rack-test 0.6.3 
Using mime-types 3.1 
Using better_errors 2.1.1 
Using binding_of_caller 0.7.2 
Using coffee-script 2.4.1 
Using uglifier 3.0.0 
Using sprockets 3.6.3 
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot 
continue. 
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. 

Ich versuche, eine Rubin-Projektdatei auf Github hochgeladen zu laufen, und ich konnte es erfolgreich klonen und ich weiß, ich sollte die Edelsteine ​​installieren, bevor ich in der Lage bin rails s auszuführen, aber jeder wenn ich versuche, bundle install zu laufe es gibt mir diese wirklich lange Codezeile^

Jedes Mal, wenn ich ein Projekt meiner eigenen mit rails new ___ mache ich bin in der Lage bundle install richtig auszuführen, die Edelsteine ​​zu installieren und auszuführen rails s I don‘ Ich verstehe nicht, warum es nicht funktioniert, wenn ich ein anderes Projekt kloniere.

UPDATE:
Wenn ich versuche, gem install sqlite3 -- --with-sqlite3-dir=/opt/local zu laufen, ist hier, was es mir

Building native extensions with: '--with-sqlite3-dir=/opt/local -E' 
This could take a while... 
ERROR: Error installing sqlite3: 
    ERROR: Failed to build gem native extension. 

    current directory: /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.11/ext/sqlite3 
/Applications/rubystack-2.2.5-3/ruby/bin/ruby -r ./siteconf20160709-86573-198qtg.rb extconf.rb --with-sqlite3-dir=/opt/local -E 
checking for sqlite3.h... *** 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=/Applications/rubystack-2.2.5-3/ruby/bin/$(RUBY_BASE_NAME) 
    --with-sqlite3-dir 
    --with-sqlite3-include 
    --without-sqlite3-include=${sqlite3-dir}/include 
    --with-sqlite3-lib 
    --without-sqlite3-lib=${sqlite3-dir}/lib 
/Applications/rubystack-2.2.5-3/ruby/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 /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:587:in `try_cpp' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:1113:in `block in find_header' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:321:in `open' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:321:in `open' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:347:in `postpone' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for' 
    from /Applications/rubystack-2.2.5-3/ruby/lib/ruby/2.2.0/mkmf.rb:1112:in `find_header' 
    from extconf.rb:30:in `<main>' 

To see why this extension failed to compile, please check the mkmf.log which can be found here: 

    /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-10/2.2.0-static/sqlite3-1.3.11/mkmf.log 

extconf failed, exit code 1 

Gem files will remain installed in /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.11 for inspection. 
Results logged to /Applications/rubystack-2.2.5-3/ruby/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-10/2.2.0-static/sqlite3-1.3.11/gem_make.out 
+0

Welche Art von Problemen? Vielleicht poste den Fehler (die Fehler). – andrunix

+0

Nein, niemand weiß, was los ist, wir brauchen mehr Informationen. Welche Art von Problemen, was passiert, wenn Sie 'bundle install' ausführen, was nicht erwartet wird? – jrochkind

+0

Sorry, aktualisiert das Problem! –

Antwort

0

Check gibt, wo Ihre SQLite installiert ist und führen Sie den folgenden Befehl ein (Ich gehe davon aus /opt/local hier)

gem install sqlite3 -- --with-sqlite3-dir=/opt/local 

und run bundle install

+0

Ich bekomme immer noch den gleichen Fehler, aktualisiert den Beitrag! –

0

Bei der Installation Im sqlite3-Juwel versagen native Erweiterungen. Dies bedeutet, dass Sie eine Systembibliothek installiert haben müssen.

Run this:

sudo apt-get install sqlite3 auf ubuntu

brew install sqlite3 auf mac

nicht sicher über Fenster.

Diese Art von Fehler "native Erweiterung konnte nicht erstellt werden" ist ziemlich häufig bei der Installation von Ruby Gems. Manchmal müssen Sie einige Ringe durchgehen, um die nativen Erweiterungen zu installieren. Oft werden Sie lange Fehler bekommen, die Ihnen zunächst nicht viel hilfreiche Informationen liefern. Versuchen Sie, eine Zeile in dem Fehler zu finden, die besagt, dass eine fehlende Bibliothek vorhanden ist, suchen Sie dann im Internet nach dieser Zeile und bestimmen Sie, was Sie installieren müssen.

Siehe auch die sqlite3-gem-fails-to-install Frage