Reputation: 12189
There is my Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/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', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use RSpec & FactoryGirl for testing
group :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
end
group :test, :development do
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
end
group :production do
gem 'pg'
end
# Use annotations for models
gem 'annotate', '>=2.6.0'
# Time and date validations
gem 'validates_timeliness'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
When I use 'git push heroku development:master' I've got the following error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/tmp/build_b80818e5-941b-4e0a-b519-dfd1f819a11e/vendor/ruby-2.0.0/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=/tmp/build_b80818e5-941b-4e0a-b519-dfd1f819a11e/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 will remain installed in /tmp/build_b80818e5-941b-4e0a-b519-dfd1f819a11e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8 for inspection.
Results logged to /tmp/build_b80818e5-941b-4e0a-b519-dfd1f819a11e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Detected sqlite3 gem which is not supported on Heroku.
! https://devcenter.heroku.com/articles/sqlite3
!
! Push rejected, failed to compile Ruby app
How can I fix it? Thanks.
Upvotes: 0
Views: 66
Reputation: 7869
you have got gem validate_timeliness
which requires sqlite3
. As far as I know you can not use anything other than Postgres on Heroku, so you have to get rid of it somehow*. You can use gem dependency -R
to see dependency tree (but only first level) of your gems.
* Not true - see comment below.
Upvotes: 1