Rails 4 - how to use sqlite3 in development and PostgreSQL in production w/Heroku

前端 未结 2 413
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-02 02:01

I am trying to deploy to Heroku but can\'t because the default sqlite3 server is still in place.

Detected sqlite3 gem which is not supported on Heroku.

2条回答
  •  青春惊慌失措
    2021-02-02 02:37

    Don't do it. You are just going to run into problems down the road. Use the same database in production and development. There are a lot of resources available in documenting the switch from a sqlite to postgres database.

    Take the time and switch.

    Have a look at this Rails Cast.

    http://railscasts.com/episodes/342-migrating-to-postgresql?view=asciicast

提交回复
热议问题