Changing Sqlite3 To Postgresql Rails
I want to host my Ruby on Rails app on Heroku. But first I need to change my database from Sqlite3 to Heroku. So I'm following these instructions: https://devcenter.heroku.com/arti
Solution 1:
Only
pgdatabase is used on heroku.
So modify your Gemfile with code:
gem 'pg'
Using above code, you can work pg db is used on heroku/
Run bundle install then push Gemfile and Gemfile.lock to heroku.
Then run heroku run rake db:migrate to run all migrations and create tables.
If you still got error then try:
gem 'pg', '~> 0.20', group: :production
Post a Comment for "Changing Sqlite3 To Postgresql Rails"