0

when I "git push heroku master" return some information like this:

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 serene-fjord-6086. remote: To https://git.heroku.com/serene-fjord-6086.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/serene-fjord-6086.git' 

but I have installed sqlite3 -v '1.3.11' successfully

Building native extensions. This could take a while... Successfully installed sqlite3-1.3.11 1 gem installed 

This is the Gemfile and I have tried adding "gem sqlite3" in "group :development,:test", but it doesn't work:

source 'https://rubygems.org' gem 'rails', '4.2.4' gem 'sqlite3' gem 'sass-rails', '~> 5.0' 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 group :development, :test do gem 'byebug' end group :development do gem 'web-console', '~> 2.0' gem 'spring' end group :production do gem 'pg','0.17.1' gem 'rails_12factor','0.0.2' end 

why ???????

3
  • This is the output of a hook on the server. Are you the server admin? Commented Nov 20, 2015 at 10:21
  • Can you please paste content of your Gemfile ? Commented Nov 20, 2015 at 10:31
  • I have pasted my Gemfile. Commented Nov 22, 2015 at 11:27

3 Answers 3

2

Heroku Use PG as database system, it won't support sqlite db. You should move sqlite gem in your gemfile inside testing, development group like this,

source 'https://rubygems.org' gem 'rails', '4.2.4' gem 'sass-rails', '~> 5.0' 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 group :development, :test do gem 'byebug' gem 'sqlite3' end group :development do gem 'web-console', '~> 2.0' gem 'spring' end group :production do gem 'pg','0.17.1' gem 'rails_12factor','0.0.2' end 
Sign up to request clarification or add additional context in comments.

2 Comments

You have not done, what i suggested. I updated my answer with your gem file. It should work.
I have copied your code , but it doesn't work. And thank you.
0

Heroku doesn't support sqlite. It only allow postgree.

Replace sqlite with Postgree. Please follow this to do that link

Comments

0

Heroku didn't have this issue before, I think it used to ignored sqlite gem before. I faced it while pushing a few days back.

Ideal solution is to put all your 'heroku non-supporting gems' inside :development & :test group in your Gemfile

group :development, :test do gem 'sqlite' end 

and keep your heroku gems inside :production group

group :production do gem 'rails_12factor' gem 'pg' #anything else end 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.