When im deploying on heroku i get
An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.3.10'` 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
i want using it with ClearDB MySQL Database
chunk of my gemfile
gem 'sqlite3', '~> 1.3.10'
or its imposible to use sqlite on heroku?
Any suggestions?
thx
i fixed it
add gem 'mysql2' instead of gem 'sqlite3', '~> 1.3.10' and its working as i expected
Related
This question already has answers here:
Errors of pushing rails app to Heroku error occurred while installing sqlite3, and Bundler cannot continue [duplicate]
(3 answers)
Closed 7 years ago.
I am trying to create a staging instance of my app on heroku.
While I am doing git push staging master
I am getting
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
And after this I am getting issues with bundler where It says
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.
I have the sqlite gem installed, and I installed it manually as well, I am still getting the same error.
Please help.
In your Gemfile
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2’
end
and also remove gem 'sqlite3' OR
group :development, :test do
gem 'sqlite3'
end
Because heroku can't install the sqlite3 gem. But you can tell bundler that it shouldn't be trying to except when developing.
Then run bundle install and try to deploy on Heroku.
Heroku does not support sqlite3 database, so you can NOT install sqlite3 gem on Heroku environment. as mentioned in this article, Heroku recommend to use Postgresql as production database.
So, all you need to do is to follow the instruction in that article and replace your sqlite3 gem with pg gem, then do some db configuration.
I have not idea how to fix this error. I've ran bundle install 1 million times. My gem file has the following code underneath and I am not deleting sqlite3 from my gem file:
group :development do
gem 'sqlite3'
end
group :production do
gem "pg"
end
Error from server log:
Gem files will remain installed in /tmp/build_5072a680-186f-45ae-bc1a-355f12885b46/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9 for inspection.
Results logged to /tmp/build_5072a680-186f-45ae-bc1a-355f12885b46/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out
Installing rack-test 0.6.2
Installing warden 1.2.3
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.9'` 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
Try this:
Make sure to install PG on Heroku. If you have heroku toolbelt installed. Open the CMD.
heroku addons:add heroku-postgresql
Make sure your gem file looks like this without white spaces:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
Try to run bundle
bundle install --deployment
I'm having some trouble with Herouku. I can't push because of the following error:
Gem files will remain installed in /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7 for inspection.
Results logged to /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.7'` 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/Rails app
And I can't solve it.
I have tried the following:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
And I keep getting the same error. I have even tried to remove sqlite3 completely. Same annoying error. I made sure to push my changes before running git push heroku master. Any ideas? Or I will probably give up on Heroku...
I've had similar problems before. This works for me in my Gemfile:
gem 'sqlite3', group: [:development, :test]
gem 'pg', group: [:production]
Also, in your local git checkout, execute the command heroku config. Confirm that the output has the following environment variables set:
RACK_ENV: production
RAILS_ENV: production
Give that a shot. Does it work for you?
How about this?
heroku rake db:reset
heroku rake db:migrate
I have referred to several different sources in order to try to push Heroku..
the error code I'm getting is:
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
Failed to install gems via Bundler.
Heroku push rejected, failed to compile Ruby/rails app
I've tried several Gemfile configurations but this is what I currently have:
group :production, :staging do
gem "pg"
end
group :development, :test do
gem "sqlite3-ruby", "~> 1.3.0", :require => "sqlite3"
end
I've also tried different bundles after.. bundle, bundle install, bundle install --without development
I keep getting the same error.
Please help
Thank you
ps: Please note, I'm new with a lot of this.. So please be as specific as possible.
Thanks again
try (on fedora) or equivalent, and then either install this gem alone or restart the bundle.
yum install sqlite-devel
I need to parse sqlite files on heroku, and as far as i know Heroku does not support sqlite.
In local, i am using the gem sqlite3, but it is rejected when pushing on heroku.
How can i use 'require sqlite3' in production ?
here is the error:
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
Thanks in advance
Pretty sure you just don't want to do that: https://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development
Heroku doesn't support sqlite and you have to use PostgreSQL. Sorry dude.
This older SO thread has a work around though:
Deploying RoR app to Heroku with Sqlite3 fails
The winning answer there was just use sqlite for dev so: (copy pasting)
group :production, :staging do
gem "pg"
end
group :development, :test do
gem "sqlite3-ruby", "~> 1.3.0", :require => "sqlite3"
end