2012-06-12 18 views
8

primo post qui =) Grazie in anticipo per l'aiuto, qualsiasi aiuto è bello a questo punto!Impossibile inviare a heroku - sqlite3.h manca

1- Ho cercato un bel po 'e ho cercato un sacco di roba, prima di considerare la pubblicazione sul StackOverflow ..

2- Quando si esegue

git push heroku master 

ottengo questo:

checking for sqlite3.h... no 
    sqlite3.h is missing. Try 'port install sqlite3 +universal' 
    or 'yum install sqlite-devel' and check your shared library search path (the 
    location where your sqlite3 shared library is located). 

3- controllato Gemfile: produzione e dev/test sono ben configurati per pg e sqlite3 rispettivamente

4- Sqlite3.h è qui:

pcbo$ ls -l /usr/include/sqlite3.h 
    -rw-r--r-- 1 root wheel 322724 7 Dec 2011 /usr/include/sqlite3.h 

5- dimenticato di dire che sto utilizzando Mac OS X ..

6- Uscita: pcbo maestro $ git push Heroku

Counting objects: 71, done. 
    Delta compression using up to 4 threads. 
    Compressing objects: 100% (58/58), done. 
    Writing objects: 100% (71/71), 26.46 KiB, done. 
    Total 71 (delta 8), reused 0 (delta 0) 

    -----> Heroku receiving push 
    -----> Ruby/Rails app detected 
    -----> Installing dependencies using Bundler version 1.2.0.pre 
    Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment 
    Fetching gem metadata from https://rubygems.org/....... 
    Installing rake (0.9.2.2) 
    Installing i18n (0.6.0) 
    Installing multi_json (1.3.6) 
    Installing activesupport (3.2.3) 
    Installing builder (3.0.0) 
    Installing activemodel (3.2.3) 
    Installing erubis (2.7.0) 
    Installing journey (1.0.3) 
    Installing rack (1.4.1) 
    Installing rack-cache (1.2) 
    Installing rack-test (0.6.1) 
    Installing hike (1.2.1) 
    Installing tilt (1.3.3) 
    Installing sprockets (2.1.3) 
    Installing actionpack (3.2.3) 
    Installing mime-types (1.18) 
    Installing polyglot (0.3.3) 
    Installing treetop (1.4.10) 
    Installing mail (2.4.4) 
    Installing actionmailer (3.2.3) 
    Installing arel (3.0.2) 
    Installing tzinfo (0.3.33) 
    Installing activerecord (3.2.3) 
    Installing activeresource (3.2.3) 
    Installing coffee-script-source (1.3.3) 
    Installing execjs (1.4.0) 
    Installing coffee-script (2.2.0) 
    Installing rack-ssl (1.3.2) 
    Installing json (1.7.3) with native extensions 
    Installing rdoc (3.12) 
    Installing thor (0.14.6) 
    Installing railties (3.2.3) 
    Installing coffee-rails (3.2.2) 
    Installing jquery-rails (2.0.2) 
    Installing pg (0.12.2) with native extensions 
    Using bundler (1.2.0.pre) 
    Installing rails (3.2.3) 
    Installing sass (3.1.19) 
    Installing sass-rails (3.2.5) 
    Installing sqlite3 (1.3.6) with native extensions 
    Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 
    /usr/local/bin/ruby extconf.rb 
    checking for sqlite3.h... no 
    sqlite3.h is missing. Try 'port install sqlite3 +universal' 
    or 'yum install sqlite-devel' and check your shared library search path (the 
    location where your sqlite3 shared library is located). 
    *** 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=/usr/local/bin/ruby 
    --with-sqlite3-dir 
    --without-sqlite3-dir 
    --with-sqlite3-include 
    --without-sqlite3-include=${sqlite3-dir}/include 
    --with-sqlite3-lib 
    --without-sqlite3-lib=${sqlite3-dir}/lib 
    --enable-local 
    --disable-local 
    Gem files will remain installed in /tmp/build_zmjrcoagwpai/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6 for inspection. 
    Results logged to /tmp/build_zmjrcoagwpai/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out 
    An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue. 
    Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling. 
    ! 
    !  Failed to install gems via Bundler. 
    ! 
    !  Heroku push rejected, failed to compile Ruby/rails app 

7- Qualsiasi aiuto è molto apprezzato!

+0

È che 'ls uscita -l' dal computer di sviluppo locale o la macchina Heroku che eseguirà il tuo software? – sarnold

+0

@sarnold: è la mia macchina di sviluppo locale – pcbo

+0

stai usando lo stack di cedro? –

risposta

11

[Update1]

dal registro git push, Qui è la vostra colpevole: -

Installing sqlite3 (1.3.6) with native extensions 

Quindi, come ho inizialmente sospettato, errore sta tentando di caricare sqlite3 gemma che avrà esito negativo Heroku. come detto in precedenza questo può accadere a causa di due motivi

  1. Gemfile è erroneamente configurato per richiedere gioiello sqlite3 nella produzione
  2. Qualche altra gemma ha dipendenza da sqlite3 gemma. utilizzare il comando gem dependency per mostrare le dipendenze della gemma & rimuovere la gemma che dipende da sqlite3.

Successivamente, eseguire bundle install & funzionerebbe.

--- [Fine Update1] ---

L'unica ragione per cui si può ottenere questo errore è quando, cercando di utilizzare sqlite3 database su Heroku che non è supportato. così strettamente ispezionare la vostra Gemfile e assicurarsi che la sua configurazione simile a questo

group :production do 
    gem 'pg' 
end 
group :development, :test do 
    gem 'sqlite3' 
end 

E poi fare bundle install per rigenerare la vostra Gemfile.lock. ora, prova a spingere heroku. se si verifica ancora questo errore, probabilmente un gioiello che si sta utilizzando ha elencato sqlite3 come dipendenza hardcoded nel suo file gemspec. così in effetti, sqlite3 viene caricato anche se non è presente in gemfile. quindi verificare questo, eseguire il seguente comando su localhost:

$ bundle install | grep sqlite 

Infine, dopo aver provato questo. non funzionaPubblica di nuovo il registro completa di git push heroku master & uscita del heroku logs.

+0

Ciao @Gaurish. come ho detto prima il Gemfile è stato configurato correttamente e il 'bundle install | grep sqlite' restituisce 'Utilizzando sqlite3 (1.3.6)' _Checking in questo momento come recuperare il Heroku logs_ – pcbo

+0

** Heroku tronchi: ** 2012-06-12T00: 53: 42 + 00: 00 Heroku [slugc ]: compilazione Slug iniziato 2012-06-12T00: 54: 09 + 00: 00 Heroku [slugc]: la compilazione Slug non riuscito: non è riuscito a compilare rubino/rails 2012-06-12T09: 20: 31 + 00: 00 Heroku [slugc]: compilazione Slug iniziato 2012-06-12T09: 21: 04 + 00: 00 Heroku [slugc]: failed compilazione Slug:? non è riuscito a compilare rubino/rails _per chi questo i log che hai chiesto _ doesn' t dare molte informazioni .. – pcbo

+0

Il log di 'git push heroku master' è nella domanda originale (passaggio 6) – pcbo

0

sembra che la libreria SQLite è mancante. Cercare di trovare con

whereis sqlite3.h 

Se è nel vostro sistema, provare:

sudo gem install sqlite3-ruby -- --with-sqlite3-include=<"url where it is(for eg: /usr/include)"> 

saluti

+0

grazie ma il problema è già risolto! :) – pcbo

Problemi correlati