I am trying to deploy a simple rails app to heroku but I keep on getting an error no matter what I try to do inorder to fix it.
I have tried moving sqlite3 into development and deleting the Gemfile.lock after running bundle but I still get the error.
I have tried removing spring and updating gems but I still get the error.
At the moment I have no idea of what to do inorder to fix this.
This is the error output when I run git push heroku master.
Counting objects: 76, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (69/69), done.
Writing objects: 100% (76/76), 21.53 KiB | 0 bytes/s, done.
Total 76 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: ###### WARNING:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies.....
remote: Installing json 1.8.3 with native extensions
remote: Installing rake 11.1.2
remote: Installing i18n 0.7.0
remote: Installing minitest 5.9.0
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 6.0.3
remote: Using bundler 1.11.2
remote: Installing execjs 2.6.0
remote: Installing coffee-script-source 1.10.0
remote: Installing sass 3.4.22
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.2
remote: Installing multi_json 1.12.0
remote: Installing tilt 2.0.4
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing tzinfo 1.2.2
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160517-323-1j0opc8.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Installing rdoc 4.2.2
remote: Installing mime-types 3.0
remote: Installing rack-test 0.6.3
remote: Installing autoprefixer-rails 6.3.6.1
remote: Installing uglifier 3.0.0
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.6.0
remote: Installing activesupport 4.2.6
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies.....
remote: Installing json 1.8.3 with native extensions
remote: Installing rake 11.1.2
remote: Installing i18n 0.7.0
remote: Installing minitest 5.9.0
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 6.0.3
remote: Using bundler 1.11.2
remote: Installing execjs 2.6.0
remote: Installing coffee-script-source 1.10.0
remote: Installing sass 3.4.22
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.2
remote: Installing multi_json 1.12.0
remote: Installing tilt 2.0.4
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing tzinfo 1.2.2
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160517-323-1j0opc8.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_aaf6ac10da8c9ad6f3f235043c390f96/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Installing rdoc 4.2.2
remote: Installing mime-types 3.0
remote: Installing rack-test 0.6.3
remote: Installing autoprefixer-rails 6.3.6.1
remote: Installing uglifier 3.0.0
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.6.0
remote: Installing activesupport 4.2.6
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to protected-thicket-11161.
remote:
To https://git.heroku.com/protected-thicket-11161.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/protected-thicket-11161.git'
and this is my Gemfile
source 'https://rubygems.org'
ruby '2.2.4'
gem 'rails', '4.2.6'
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass', '3.2.0.2'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
gem 'puma'
gem 'pg'
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'sqlite3'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I have looked at other questions and none of their solutions have helped me. Hopefully I can gain some insight on what to do here on stackoverflow.
Thanks
remote: Removing 'Gemfile.lock' because it was generated on Windows.
This line probably has something to do with your woes. Are you developing on a windows machine?
Heroku documentation on this issue.
Check you Gemfile.lock for any other gems that may have dependencies on sqlite3, as this can also cause problems, for test just remove gem and try deploying code again.
Related
I am trying to push my app to heroku, but I could not prevent it from installing sqlite3 - I believe this is what is causing the problem pushing it.
I have read and applied the following SO posts:
Deploying RoR app to Heroku with Sqlite3 fails
HEROKU - cannot run git push heroku master
Unable to Deploy Rails App to Heroku, Gem Errors (SQLite3 and Gem Native Extension)
I have also made sure to commit my work:
git add .
git commit -m "sqlite3 problem"
git push heroku master
I tried deleting the Gemfile.lock and running both bundle and bundle install and add, commit, and pushed it to heroku, but still no luck.
This is inside my Gemfile:
group :production do
gem 'pg'
end
group :development, :test do
gem 'byebug', platform: :mri
gem 'faker', '~> 1.7', '>= 1.7.3'
gem 'rspec-rails', '~> 3.5'
gem 'factory_girl_rails', '~> 4.8'
gem 'sqlite3'
end
Error log:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.3.4
remote: -----> Installing dependencies using bundler 1.13.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Installing i18n 0.8.1
remote: Installing rake 12.0.0
remote: Installing concurrent-ruby 1.0.5
remote: Installing minitest 5.10.1
remote: Installing thread_safe 0.3.6
remote: Installing builder 3.2.3
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.1.0
remote: Installing nio4r 2.0.0 with native extensions
remote: Installing rack 2.0.1
remote: Installing websocket-extensions 0.1.2
remote: Installing mime-types-data 3.2016.0521
remote: Installing arel 7.1.4
remote: Installing connection_pool 2.2.1
remote: Installing thor 0.19.4
remote: Installing jwt 1.5.6
remote: Installing method_source 0.8.2
remote: Installing multi_json 1.12.1
remote: Using bundler 1.13.7
remote: Installing puma 3.8.2 with native extensions
remote: Installing redis 3.3.3
remote: Installing sqlite3 1.3.13 with native extensions
remote: Installing tzinfo 1.2.3
remote: Installing nokogiri 1.7.1 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing rack-protection 2.0.0
remote: Installing sprockets 3.7.1
remote: Installing websocket-driver 0.6.5 with native extensions
remote: Installing mime-types 3.1
remote: Installing foreman 0.84.0
remote: Installing twilio-ruby 4.11.1
remote: Installing activesupport 5.0.2
remote: Installing sidekiq 5.0.0
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: current directory:
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/ext/sqlite3
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/ruby-2.3.4/bin/ruby -r
remote: ./siteconf20170606-219-133actd.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'brew install sqlite3',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/ruby-2.3.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-config
remote: --without-sqlite3-config
remote: --with-pkg-config
remote: --without-pkg-config
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote: To see why this extension failed to compile, please check the mkmf.log which can
remote: be found here:
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/sqlite3-1.3.13/mkmf.log
remote: extconf failed, exit code 1
remote: Gem files will remain installed in
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13
remote: for inspection.
remote: Results logged to
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/sqlite3-1.3.13/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.13), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.13'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Installing i18n 0.8.1
remote: Installing rake 12.0.0
remote: Installing concurrent-ruby 1.0.5
remote: Installing minitest 5.10.1
remote: Installing thread_safe 0.3.6
remote: Installing builder 3.2.3
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.1.0
remote: Installing nio4r 2.0.0 with native extensions
remote: Installing rack 2.0.1
remote: Installing websocket-extensions 0.1.2
remote: Installing mime-types-data 3.2016.0521
remote: Installing arel 7.1.4
remote: Installing connection_pool 2.2.1
remote: Installing thor 0.19.4
remote: Installing jwt 1.5.6
remote: Installing method_source 0.8.2
remote: Installing multi_json 1.12.1
remote: Using bundler 1.13.7
remote: Installing puma 3.8.2 with native extensions
remote: Installing redis 3.3.3
remote: Installing sqlite3 1.3.13 with native extensions
remote: Installing tzinfo 1.2.3
remote: Installing nokogiri 1.7.1 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing rack-protection 2.0.0
remote: Installing sprockets 3.7.1
remote: Installing websocket-driver 0.6.5 with native extensions
remote: Installing mime-types 3.1
remote: Installing foreman 0.84.0
remote: Installing twilio-ruby 4.11.1
remote: Installing activesupport 5.0.2
remote: Installing sidekiq 5.0.0
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: current directory:
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/ext/sqlite3
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/ruby-2.3.4/bin/ruby -r
remote: ./siteconf20170606-219-133actd.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'brew install sqlite3',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/ruby-2.3.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-config
remote: --without-sqlite3-config
remote: --with-pkg-config
remote: --without-pkg-config
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote:
remote: To see why this extension failed to compile, please check the mkmf.log which can
remote: be found here:
remote:
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/sqlite3-1.3.13/mkmf.log
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13
remote: for inspection.
remote: Results logged to
remote: /tmp/build_cb97a281aec933a41e755d6b82c2e524/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/sqlite3-1.3.13/gem_make.out
remote:
remote: An error occurred while installing sqlite3 (1.3.13), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.13'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: ! Detected sqlite3 gem which is not supported on Heroku:
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
Every single time, I keep seeing this line Installing sqlite3 1.3.13 with native extensions and I believe that is what caused the error, even though I don't have sqlite3 in production. I have also tried removing sqlite3 altogether from Gemfile and have only gem pg, but it still somehow installs sqlite3 when I push it to heroku.
How can I push the app to heroku successfully?
EDIT:
The problem is solved (well, technically not - I am still having trouble pushing, but the sqlite3 error disappeared, and that's the gist of this question). Here is what I did wrong: I was working on other local branch when I see the error message, let's say iggy-branch-2. I did my git add ., git commit -m "some message", and git push heroku master on this branch. When I switched back to master branch and git merge iggy-branch-2, and after I git push heroku master, it stopped trying to install sqlite3. It appears that when I push to heroku, it looks for gemfile.lock inside master branch (someone correct me if I'm wrong).
The comments and answer here gave me the insight that the only way to update gemfile.lock is really just to bundle it up. I figured I did all the right thing, so I decided to try switching branches.
Take-home: make sure my master branch is up-to-date. Seems like Heroku looks there for gemfile info.
Thanks, everyone!
This is because herouku uses your gemfile.lock to know the gems and versions to use instead of the gemfile, you must:
run a bundle install locally to update your gemfile.lock
commit and push that change to git(hub)
push to heroku.
Good luck!
Edit: Also, make sure to include your gemfile.lock to git, although that's kind of obvious
When you do git push heroku master, it pushes your local master branch onto the master branch of the heroku remote (no matter which local branch is currently checked out).
If you are working on a different branch, say 'feature/foo' and you want to deploy that branch, you need to tell git explicitly by doing git push feature/foo:master
Another way, from the git push documentation:
git push origin HEAD:master
Push the current branch to the remote ref matching master in the origin repository. This form is convenient to push the current branch without thinking about its local name.
As you correctly guessed, the problem was that you were working on a branch but deploying master. This is why merging to master before deploying also solved the problem.
I am going through the process of installing Rails on my Linux OS. I have gone through most of the process but it appears something went amiss.
I am using this tutorial:
http://installfest.railsbridge.org/installfest/deploy_a_rails_app
Before things went wrong input to begin the process of adding my changes to Git.
[Atlas 02:29 PM] ~/railsbridge/test_app $ git add .
[Atlas 02:30 PM] ~/railsbridge/test_app $ git commit -m "Updates for heroku deployment"
On branch master
nothing to commit, working directory clean
I then attempted to Push to Heroku
git push heroku master
I recieved what appeared to be an error,
Counting objects: 114, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (100/100), done.
Writing objects: 100% (114/114), 25.08 KiB | 0 bytes/s, done.
Total 114 (delta 7), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/..........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Installing i18n 0.7.0
remote: Installing concurrent-ruby 1.0.2
remote: Installing rake 11.2.2
remote: Installing builder 3.2.2
remote: Installing minitest 5.9.0
remote: Installing thread_safe 0.3.5
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.1.0
remote: Installing pkg-config 1.1.7
remote: Installing rack 2.0.1
remote: Installing nio4r 1.2.1 with native extensions
remote: Installing websocket-extensions 0.1.2
remote: Installing arel 7.1.1
remote: Installing mime-types-data 3.2016.0521
remote: Installing execjs 2.7.0
remote: Installing coffee-script-source 1.10.0
remote: Installing method_source 0.8.2
remote: Installing thor 0.19.1
remote: Installing multi_json 1.12.1
remote: Installing pg 0.18.4 with native extensions
remote: Installing puma 3.6.0 with native extensions
remote: Using bundler 1.11.2
remote: Installing sass 3.4.22
remote: Installing tilt 2.0.5
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing turbolinks-source 5.0.0
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.8 with native extensions
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160911-219-equyi.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing rack-test 0.6.3
remote: Installing sprockets 3.7.0
remote: Installing websocket-driver 0.6.4 with native extensions
remote: Installing mime-types 3.1
remote: Installing uglifier 3.0.2
remote: Installing coffee-script 2.4.1
remote: Installing turbolinks 5.0.1
remote: Installing activesupport 5.0.0.1
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: Bundler Output: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/..........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Installing i18n 0.7.0
remote: Installing concurrent-ruby 1.0.2
remote: Installing rake 11.2.2
remote: Installing builder 3.2.2
remote: Installing minitest 5.9.0
remote: Installing thread_safe 0.3.5
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.1.0
remote: Installing pkg-config 1.1.7
remote: Installing rack 2.0.1
remote: Installing nio4r 1.2.1 with native extensions
remote: Installing websocket-extensions 0.1.2
remote: Installing arel 7.1.1
remote: Installing mime-types-data 3.2016.0521
remote: Installing execjs 2.7.0
remote: Installing coffee-script-source 1.10.0
remote: Installing method_source 0.8.2
remote: Installing thor 0.19.1
remote: Installing multi_json 1.12.1
remote: Installing pg 0.18.4 with native extensions
remote: Installing puma 3.6.0 with native extensions
remote: Using bundler 1.11.2
remote: Installing sass 3.4.22
remote: Installing tilt 2.0.5
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing turbolinks-source 5.0.0
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.8 with native extensions
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160911-219-equyi.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_6e2f5dfec8d2bc5e0cc51d96d3f2ae67/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing rack-test 0.6.3
remote: Installing sprockets 3.7.0
remote: Installing websocket-driver 0.6.4 with native extensions
remote: Installing mime-types 3.1
remote: Installing uglifier 3.0.2
remote: Installing coffee-script 2.4.1
remote: Installing turbolinks 5.0.1
remote: Installing activesupport 5.0.0.1
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to infinite-scrubland-38681.
remote:
To https://git.heroku.com/infinite-scrubland-38681.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/infinite-scrubland-38681.git'
The tutorial tells me the results should look like this
The authenticity of host 'heroku.com (75.101.145.87)' can't be established.
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,75.101.145.87' (RSA) to the list of known hosts.
Counting objects: 60, done.
Compressing objects: 100% (54/54), done.
Writing objects: 100% (60/60), 79.03 KiB, done.
Total 60 (delta 10), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
Compiled slug size is 080K
-----> Launching...... done
App deployed to Heroku
To git#heroku.com:floating-winter-18.git
* [new branch] master -> master
Where did I go wrong?
I apologize ahead of time if i wasn't detailed enough in my question or violated a site rule. I am completely new here. Thank you in advance for all your help.
The error is caused by the sqlite3 gem that cannot be installed on Heroku (I don't know why). This was already solved here:
Heroku deployment failed because of sqlite3 gem error
Ok so i tryed the link. I already tried replacing sqlite in my gemfile with
group :development, :test do
gem 'pg'
end
group :production do
gem 'pg'
end
That made no difference
Initially, I tried to push my application up to heroku with the git push heroku master command and I got this error:
$ git push heroku master
Counting objects: 106, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (94/94), done.
Writing objects: 100% (106/106), 20.47 KiB | 0 bytes/s, done.
Total 106 (delta 21), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: ###### WARNING:
remote: Removing `Gemfile.lock` because it was generated on Windows.
remote: Bundler will do a full resolve so native gems are handled properly.
remote: This may result in unexpected gem versions being used in your app.
remote: In rare occasions Bundler may not be able to resolve your dependencies at all.
remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies....
remote: Installing json 1.8.3 with native extensions
remote: Installing i18n 0.7.0
remote: Installing rake 11.1.2
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 6.0.3
remote: Using bundler 1.11.2
remote: Installing sass 3.4.21
remote: Installing execjs 2.6.0
remote: Installing coffee-script-source 1.10.0
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.1
remote: Installing multi_json 1.11.2
remote: Installing pg 0.18.4 with native extensions
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing tilt 2.0.2
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160328-319-1a7qvmc.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing rack-test 0.6.3
remote: Installing mime-types 3.0
remote: Installing rdoc 4.2.2
remote: Installing autoprefixer-rails 6.3.5
remote: Installing uglifier 3.0.0
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.5.2
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.5
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Resolving dependencies....
remote: Installing json 1.8.3 with native extensions
remote: Installing i18n 0.7.0
remote: Installing rake 11.1.2
remote: Installing minitest 5.8.4
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.0.0
remote: Installing rack 1.6.4
remote: Installing mime-types-data 3.2016.0221
remote: Installing arel 6.0.3
remote: Using bundler 1.11.2
remote: Installing sass 3.4.21
remote: Installing execjs 2.6.0
remote: Installing coffee-script-source 1.10.0
remote: Installing thor 0.19.1
remote: Installing concurrent-ruby 1.0.1
remote: Installing multi_json 1.11.2
remote: Installing pg 0.18.4 with native extensions
remote: Installing rails_serve_static_assets 0.0.5
remote: Installing rails_stdout_logging 0.0.5
remote: Installing sqlite3 1.3.11 with native extensions
remote: Installing tilt 2.0.2
remote: Installing tzinfo 1.2.2
remote: Installing nokogiri 1.6.7.2 with native extensions
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160328-319-1a7qvmc.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_7c1c7338241e4f828405d4c473f1dfdd/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing rack-test 0.6.3
remote: Installing mime-types 3.0
remote: Installing rdoc 4.2.2
remote: Installing autoprefixer-rails 6.3.5
remote: Installing uglifier 3.0.0
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.5.2
remote: Installing rails_12factor 0.0.3
remote: Installing activesupport 4.2.5
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to pengame.
remote:
To https://git.heroku.com/pengame.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/
When I try to install a gem I get this error:
$ gem install sqlite3 -v '1.3.11'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.11-x86-mingw32/lib/sqlite3/2.1/sqlite3_native.so
Here's my Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3', '>= 1.3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'bootstrap-sass'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I'm not sure what I could be doing wrong.
My application works perfectly on the development server.
Anybody know why this might be happening??
Heroku doesn't support sqlite and is therefore refusing to install the native extensions. Since you're not using sqlite in production you should probably isolate the sqlite gem to environments run on your local machine (i.e. test and dev groups). Though I'd also recommend using Postgres in all environments, including tests, for consistency.
Perhaps you've seen this but there's also a very useful article on Heroku on how to setup Postgres on Heroku here: https://devcenter.heroku.com/articles/getting-started-with-rails4#heroku-gems.
I just created an app on Heroku to house my rails app, and I'm trying to push for the first time. It seems like a lot of things failed, but I don't know exactly what. Here's the log:
Counting objects: 98, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (87/87), done.
Writing objects: 100% (98/98), 214.77 KiB | 0 bytes/s, done.
Total 98 (delta 8), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: -----> Installing dependencies using bundler 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Installing i18n 0.7.0
remote: Installing rake 10.5.0
remote: Installing minitest 5.8.4
remote: Installing builder 3.2.2
remote: Installing thread_safe 0.3.5
remote: Installing mini_portile2 2.0.0
remote: Installing erubis 2.7.0
remote: Installing mime-types 2.99
remote: Installing json 1.8.3
remote: Installing rack 1.6.4
remote: Installing arel 6.0.3
remote: Installing coffee-script-source 1.10.0
remote: Installing execjs 2.6.0
remote: Installing thor 0.19.1
remote: Using bundler 1.9.7
remote: Installing multi_json 1.11.2
remote: Installing concurrent-ruby 1.0.0
remote: Installing tilt 2.0.2
remote: Installing sass 3.4.21
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160214-318-tcurx0.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote: extconf failed, exit code 1
remote: Gem files will remain installed in /tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing tzinfo 1.2.2
remote: Installing mail 2.6.3
remote: Installing rack-test 0.6.3
remote: Installing rdoc 4.2.2
remote: Installing uglifier 2.7.2
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.5.2
remote: Installing nokogiri 1.6.7.2
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Installing i18n 0.7.0
remote: Installing rake 10.5.0
remote: Installing minitest 5.8.4
remote: Installing builder 3.2.2
remote: Installing thread_safe 0.3.5
remote: Installing mini_portile2 2.0.0
remote: Installing erubis 2.7.0
remote: Installing mime-types 2.99
remote: Installing json 1.8.3
remote: Installing rack 1.6.4
remote: Installing arel 6.0.3
remote: Installing coffee-script-source 1.10.0
remote: Installing execjs 2.6.0
remote: Installing thor 0.19.1
remote: Using bundler 1.9.7
remote: Installing multi_json 1.11.2
remote: Installing concurrent-ruby 1.0.0
remote: Installing tilt 2.0.2
remote: Installing sass 3.4.21
remote:
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160214-318-tcurx0.rb extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/lib
remote:
remote: extconf failed, exit code 1
remote:
remote: Gem files will remain installed in /tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection.
remote: Results logged to /tmp/build_84631dc00e714fc859136f5075e7ce25/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out
remote: Installing tzinfo 1.2.2
remote: Installing mail 2.6.3
remote: Installing rack-test 0.6.3
remote: Installing rdoc 4.2.2
remote: Installing uglifier 2.7.2
remote: Installing coffee-script 2.4.1
remote: Installing sprockets 3.5.2
remote: Installing nokogiri 1.6.7.2
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to infinite-citadel-84574.
remote:
To https://git.heroku.com/infinite-citadel-84574.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/infinite-citadel-84574.git'
I tried installing sqlite3 version 1.3.11 manually and it installed just fine, however I still get errors. I also tried to run the apt-get install libsqlite3-dev line to solve the missing sqlite3.h file issue but the package was already installed. I also tried running rake assets:precompile to pre-compile the app before uploading it to heroku, something I read on another post.
Heroku doesn't support sqlite: https://devcenter.heroku.com/articles/sqlite3
You need to set your app up with a postgresql DB for it to work on Heroku: https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-ruby
I'm trying to post my demo app on heroku(from ruby tutorial), but I face the error of incorrect git push heroku master implementation:
Counting objects: 129, done.
Compressing objects: 100% (114/114), done.
Writing objects: 100% (129/129), 119.95 KiB | 0 bytes/s, done.
Total 129 (delta 19), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/.. [173/194]
remote: Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Installing rake 10.4.2
remote: Installing i18n 0.7.0
remote: Installing json 1.8.3
remote: Installing minitest 5.7.0
remote: Installing thread_safe 0.3.5
remote: Installing tzinfo 1.2.2
remote: Installing activesupport 4.2.3
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile 0.6.2
remote: Installing nokogiri 1.6.6.2
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing rails-dom-testing 1.0.6
remote: Installing loofah 2.0.2
remote: Installing rails-html-sanitizer 1.0.2
remote: Installing actionview 4.2.3
remote: Installing rack 1.6.4
remote: Installing rack-test 0.6.3
remote: Installing actionpack 4.2.3
remote: Installing globalid 0.3.5
remote: Installing activejob 4.2.3
remote: Installing mime-types 2.6.1
remote: Installing mail 2.6.3
remote: Installing actionmailer 4.2.3
remote: Installing activemodel 4.2.3
remote: Installing arel 6.0.0
remote: Installing activerecord 4.2.3
remote: Installing coffee-script-source 1.9.1.1
remote: Installing execjs 2.5.2
remote: Installing coffee-script 2.4.1
remote: Installing thor 0.19.1
remote: Installing railties 4.2.3
remote: Installing coffee-rails 4.1.0
remote: Installing multi_json 1.11.2
remote: Installing jbuilder 2.3.1
remote: Installing jquery-rails 4.0.4
remote: Installing pg 0.18.2
remote: Using bundler 1.9.7
remote: Installing sprockets 3.2.0
remote: Installing sprockets-rails 2.3.2
remote: Installing rails 4.2.3
remote: Installing rails_serve_static_assets 0.0.4
remote: Installing rails_stdout_logging 0.0.3
remote: Installing rails_12factor 0.0.2
remote: Installing rdoc 4.2.0
remote: Installing sass 3.4.15
remote: Installing tilt 1.4.1
remote: Installing sass-rails 5.0.3
remote: Installing sdoc 0.4.1
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/ruby-2.0.0/bin/ruby extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/ruby-2.0.0/bin/ruby
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/
remote: Gem files will remain installed in /tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10 for inspection.
remote: Results logged to /tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Installing rake 10.4.2
remote: Installing i18n 0.7.0
remote: Installing json 1.8.3
remote: Installing minitest 5.7.0
remote: Installing thread_safe 0.3.5
remote: Installing tzinfo 1.2.2
remote: Installing activesupport 4.2.3
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile 0.6.2
remote: Installing nokogiri 1.6.6.2
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing rails-dom-testing 1.0.6
remote: Installing loofah 2.0.2
remote: Installing rails-html-sanitizer 1.0.2
remote: Installing actionview 4.2.3
remote: Installing rack 1.6.4
remote: Installing rack-test 0.6.3
remote: Installing actionpack 4.2.3
remote: Installing globalid 0.3.5
remote: Installing activejob 4.2.3
remote: Installing mime-types 2.6.1
remote: Installing mail 2.6.3
remote: Installing actionmailer 4.2.3
remote: Installing activemodel 4.2.3
remote: Installing arel 6.0.0
remote: Installing activerecord 4.2.3
remote: Installing execjs 2.5.2 [56/194]
remote: Installing coffee-script 2.4.1
remote: Installing thor 0.19.1
remote: Installing railties 4.2.3
remote: Installing coffee-rails 4.1.0
remote: Installing multi_json 1.11.2
remote: Installing jbuilder 2.3.1
remote: Installing jquery-rails 4.0.4
remote: Installing pg 0.18.2
remote: Using bundler 1.9.7
remote: Installing sprockets 3.2.0
remote: Installing sprockets-rails 2.3.2
remote: Installing rails 4.2.3
remote: Installing rails_serve_static_assets 0.0.4
remote: Installing rails_stdout_logging 0.0.3
remote: Installing rails_12factor 0.0.2
remote: Installing rdoc 4.2.0
remote: Installing sass 3.4.15
remote: Installing tilt 1.4.1
remote: Installing sass-rails 5.0.3
remote: Installing sdoc 0.4.1
remote:
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/ruby-2.0.0/bin/ruby extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/ruby-2.0.0/bin/ruby
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/
remote:
remote:
remote: Gem files will remain installed in /tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10 for inspection.
remote: Results logged to /tmp/build_32f45e65619752c6e5c6598bfc3ced31/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to hopehope.
remote:
To https://git.heroku.com/hopehope.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/hopehope.git'
azureuser#host:~/railstutorial_apps/demo$
(Also, the app launches on azure virtual machine without any error)
I've already tried to install sqllite separately (successful), but even after installation of sqllite I have the same error :(
The sqlite3 gem in Gemfile:
gem 'sqlite3', '1.3.10'
in your gemfile add gem 'pg' as production group because heroku support postgresql
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
and add adapter: postgresql your database.yml
production:
adapter: postgresql
encoding: unicode
database: database_name_production
Heroku doesn't support sqlite3, hence it won't have the library files required to install the sqlite3 gem.
You need to add sqlite3 to a development block in your Gemfile so that it won't get installed during deployment.
group :development do
gem 'sqlite3'
end
Also on a side note make sure your application is running as expected using postgresql as well. Personally I suggest the same type of DB for development as well, so that there won't be any surprises when you transfer your application to production.