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

1

2 Answers 2

20

sqlite3 development.db .dump | psql dbname username

Sign up to request clarification or add additional context in comments.

2 Comments

note that some datatypes need to be converted ,stackoverflow.com/a/4581921/1099531
To connect to a psql database: psql -h <host> -p <port> -U <username> <database> You will be prompted for a password.
8

Sequel will help you

gem install sequel

sequel -C sqlite://db/development.sqlite3 postgres://username:password@localhost/dbname

1 Comment

Was Very helpful

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.