Sqlite3 gem not supported on Heroku

When I tried to deploy second part of RoR tutorial to Heroku I get this error:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
An error occurred while installing sqlite3 (1.3.5), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling.
!
!  Failed to install gems via Bundler.
!
! Detected sqlite3 gem which is not supported on Heroku.
!  http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development
!
!  Heroku push rejected, failed to compile Ruby/rails app
To git@heroku.com:thawing-beyond-7283.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:thawing-beyond-7283.git'

I searched a little bit about this error and find this stackoverflow post. But when I look more carefully on the Gemfile syntax I found a mistake. I used simply:

1
gem 'sqlite3', '1.3.5'

But I should have:

1
2
3
4
5
  gem 'sqlite3', '1.3.5'
end
group :production do
  gem 'pg', '0.12.2'
end

As RoR tutorial states.


Piotr Król
I’m into open-source firmware, drawing inspiration from the classic hacker ethos of collaborative innovation and transparency. At 3mdeb, we’re excited about our two main projects: Zarhus OS, an Embedded Linux distribution based on Yocto, and Dasharo, a coreboot downstream. Both are about the value of open development, embedded firmware resilience, platform security transparency, the right to repair, and digital sovereignty. Community is at the center of our activity. By being involved in the Dasharo Users Group, Dasharo Developers vPub, and events like the Qubes OS Summit, we connect with others who share our passion for open-source.