git - Rails app using sqlite3 for development won't deploy into heroku -


i trying deploy rails app created using sqlite3. after running git push heroku master keep getting following error

initializing repository, done. counting objects: 164, done. delta compression using 4 threads. compressing objects: 100% (147/147), done. writing objects: 100% (164/164), 78.88 kib | 0 bytes/s, done. total 164 (delta 33), reused 0 (delta 0)  -----> ruby app detected -----> compiling ruby/rails -----> using ruby version: ruby-2.0.0 -----> installing dependencies using 1.6.3        running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment        fetching gem metadata https://rubygems.org/.........        fetching additional metadata https://rubygems.org/..        installing rake 10.3.2        installing i18n 0.6.9        installing minitest 5.3.5        installing thread_safe 0.3.4        installing builder 3.2.2        installing erubis 2.7.0        installing rack 1.5.2        installing mime-types 1.25.1        installing polyglot 0.3.5        installing json 1.8.1        installing arel 5.0.1.20140414130214        installing coffee-script-source 1.7.0        installing execjs 2.2.0        installing thor 0.19.1        using bundler 1.6.3        installing hike 1.2.3        installing multi_json 1.10.1        installing sass 3.2.19        installing tilt 1.4.1        gem::installer::extensionbuilderror: error: failed build gem native extension.        /tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/ruby-2.0.0/bin/ruby extconf.rb        checking sqlite3.h... no        sqlite3.h missing. try 'port install sqlite3 +universal',        'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'        , check shared library search path (the        location sqlite3 shared library located).        *** 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=/tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/ruby-2.0.0/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}/        --enable-local        --disable-local        gem files remain installed in /tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9 inspection.        results logged /tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out        installing rack-test 0.6.2        installing tzinfo 1.2.1        error occurred while installing sqlite3 (1.3.9), , bundler cannot continue.        make sure `gem install sqlite3 -v '1.3.9'` succeeds before bundling.        bundler output: fetching gem metadata https://rubygems.org/.........        fetching additional metadata https://rubygems.org/..        installing rake 10.3.2        installing i18n 0.6.9        installing minitest 5.3.5        installing thread_safe 0.3.4        installing builder 3.2.2        installing erubis 2.7.0        installing rack 1.5.2        installing mime-types 1.25.1        installing polyglot 0.3.5        installing json 1.8.1        installing arel 5.0.1.20140414130214        installing coffee-script-source 1.7.0        installing execjs 2.2.0        installing thor 0.19.1        using bundler 1.6.3        installing hike 1.2.3        installing multi_json 1.10.1        installing sass 3.2.19        installing tilt 1.4.1         gem::installer::extensionbuilderror: error: failed build gem native extension.         /tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/ruby-2.0.0/bin/ruby extconf.rb        checking sqlite3.h... no        sqlite3.h missing. try 'port install sqlite3 +universal',        'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'        , check shared library search path (the        location sqlite3 shared library located).        *** 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=/tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/ruby-2.0.0/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}/        --enable-local        --disable-local          gem files remain installed in /tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9 inspection.        results logged /tmp/build_c9d45d78-4c2b-4825-9bd8-b3961ccc175f/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out        installing rack-test 0.6.2        installing tzinfo 1.2.1        error occurred while installing sqlite3 (1.3.9), , bundler cannot continue.        make sure `gem install sqlite3 -v '1.3.9'` succeeds before bundling.  !  !     failed install gems via bundler.  !       !     detected sqlite3 gem not supported on heroku.  !     https://devcenter.heroku.com/articles/sqlite3  !   !     push rejected, failed compile ruby app  git@heroku.com:rocky-dusk-1857.git  ! [remote rejected] master -> master (pre-receive hook declined) error: failed push refs 'git@heroku.com:rocky-dusk-1857.git' 

this gemfile:

source 'https://rubygems.org'   # bundle edge rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.1.1' # use sqlite3 database active record group :development   gem 'sqlite3', '1.3.8'   gem 'spring' end # use scss stylesheets gem 'sass-rails', '~> 4.0.3' # use uglifier compressor javascript assets gem 'uglifier', '>= 1.3.0' # use coffeescript .js.coffee assets , views gem 'coffee-rails', '~> 4.0.0' # see https://github.com/sstephenson/execjs#readme more supported runtimes # gem 'therubyracer',  platforms: :ruby  # use jquery javascript library gem 'jquery-rails' # turbolinks makes following links in web application faster. read more: https://github.com/rails/turbolinks gem 'turbolinks' # build json apis ease. read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates api under doc/api. gem 'sdoc', '~> 0.4.0',          group: :doc  group :production   gem 'pg'   gem 'rails_12factor' end 

i deployed applications appeared on "rails tutorial" michael hartl no problem developing own apps newer version of rails , ruby , having trouble this. appreciate it.

data

heroku doesn't support sqlite3 stores data on hard drive (which overwritten on new push).

a persistent data store (database) required, , heroku recommend postgres.

--

error

i think error have several potential causes:

  1. you've not updated gemfile.lock file
  2. you've not committed gemfile before committing heroku
  3. one of gems depends on sqlite3 (unlikely)

i resolve issue this:

#gemfile group :development    #gem 'sqlite' -> comment out end  group :production    gem 'pg' end 

then make sure i've committed changes:

$ git add . $ git commit -a -m "heroku" $ git push heroku master 

this allow push bona-fide version of gemfile heroku, consequently allowing test deployment properly

if need further assistance, please comment & i'll help!


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -