Get SQLite error using heroku db:push when I'm using PostgreSQL as development db
Asked Answered
S

5

12

I was having problems pushing data from my development db to Heroku. I decided to switch to PostgreSQL as my development db and have updated database.yml and removed the sqlite gem from the gemfiles.

The app runs fine against PostgreSQL but when I try to run the command:

heroku db:push

I get an SQLite error which is puzzling because there is no reference to sqlite in my project:

 !    Taps Load Error: cannot load such file -- sqlite3
 !    You may need to install or update the taps gem to use db commands.
 !    On most systems this will be:
 !    
 !    sudo gem install taps

Here is my database.yml file:

development:
  adapter: postgresql
  encoding: unicode
  database: xxxx
  pool: 5
  timeout: 5000
  username: xxxx
  password: xxxx

test:
  adapter: postgresql
  encoding: unicode
  database: test
  pool: 5
  timeout: 5000
  username: xx
  password: xx

production:
  adapter: postgresql
  encoding: unicode
  database: test
  pool: 5
  timeout: 5000

I'm using RVM and I have created a new gemset without any luck.

I even tried this but got the same SQLite error:

heroku db:push postgres://xx:xx@localhost/xx

 !    Taps Load Error: cannot load such file -- sqlite3
 !    You may need to install or update the taps gem to use db commands.
 !    On most systems this will be:
 !    
 !    sudo gem install taps

I have also run bundle install and bundle update.

Johann

Shayneshays answered 4/3, 2012 at 19:21 Comment(0)
P
10

I was having the same problem and solved it by moving taps into a development group in my gemfile- taps requires sqlite, which is what was causing the problem.

group :development do
  gem 'taps', :require => false # has an sqlite dependency, which heroku hates
end
Philanthropy answered 4/3, 2012 at 19:40 Comment(5)
tried that, but get the same error (I ran bundle install and update and commited to heroku before pushing db ... get an sqlite error).Shayneshays
Solved it - tekniklr answer put me on the correct track. The problem was that taps is using sqlite and that wasn't installed on the client machine (I think I manually removed it manually before). After I installed sqlite it worked fine.Shayneshays
I had the same problem. I thought it was a homebrew problem as I installed heroku manually in conjunction to using homebrew at some point to test something. 'gem install sqlite3' solved the problem.Siltstone
taps doesn't have sqlite3 runtime dependencyInseverable
It might not anymore, but 7 months ago it did :)Philanthropy
A
8

The solution is to add not only taps gem but also sqlite3 gem into the :development group. If you are using in your development sqlite3 already, then just adding taps gem will be enough. But I am using mysql on my development so to solve that problem I had to add both.

group :development do
  gem 'taps'
  gem 'sqlite3'
end
Administer answered 25/9, 2012 at 10:38 Comment(0)
S
4
gem install sqlite3

solved it for me.

Southard answered 24/6, 2013 at 23:5 Comment(0)
C
0

On my debian wheezy I needed to install:

aptitude install libsqlite3-dev
Chandachandal answered 17/10, 2012 at 15:9 Comment(0)
J
0
gem install sqlite3 

Is all you need. The error is coming locally, not from Heroku

Jamiejamieson answered 6/7, 2013 at 18:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.