Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku db:push problems

Tags:

heroku

gem

I'm trying to push my local Postgres db to my Heroku app, and following Heroku guide, I did heroku db:push but I get the following error:

leonsas@leonsas-VirtualBox:~$ heroku db:push
 !    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 already tried sudo gem install taps, sudo gem install sqlite3, but I cant make it work. Any ideas why it's trying to load an sqlite3 db when I'm using postgres?

like image 969
leonsas Avatar asked Jun 20 '12 19:06

leonsas


1 Answers

Taps is no longer the recommended tool to use when migrating data between postgres instances. Please give heroku-pg-transfer a try instead.

This will only work if you're using one of the production databases or the new Heroku postgres dev plan. If you're still on the older shared database plan I would suggest switching to the new dev plan.

First, find the URL to your db on Heroku:

$ heroku config:get DATABASE_URL
postgres://yada:[email protected]:5432/123

Then transfer from your local db to the heroku db:

$ heroku plugins:install https://github.com/ddollar/heroku-pg-transfer
$ heroku pg:transfer -f postgres://localhost/dbname -t postgres://yada:yada@ec2.../123

Since the heroku-pg-transfer tool utilizes postgres's native pg_dump facility it is a much more predictable and resilient tool.

like image 186
Ryan Daigle Avatar answered Oct 19 '22 18:10

Ryan Daigle