18

I'm a DB noob so please be kind with me.

I'm having some issues pushing my SQLite DB to Heroku via taps gem. Talking with them, they told me one of the solutions could be converting locally my DB from SQLite to PostgreSQL. Is there an easy way to do so?

Thanks

More info: - DB from Rails app - I'm on Mac OS X - Just installed PostgreSQL via macports

Leonardo Dario Perna
  • 1,045
  • 2
  • 10
  • 23
  • 1
    Now there's a better way - use the taps gem as described in http://railscasts.com/episodes/342-migrating-to-postgresql – jpw Oct 14 '12 at 20:28

2 Answers2

20

sqlite3 development.db .dump | psql dbname username

jxpx777
  • 3,632
  • 4
  • 27
  • 43
8

Sequel will help you

gem install sequel

sequel -C sqlite://db/development.sqlite3 postgres://username:password@localhost/dbname
Mikhail Chuprynski
  • 2,404
  • 2
  • 29
  • 42