【发布时间】:2017-03-30 06:02:47
【问题描述】:
我的应用无法在 heroku 上运行,但它在我的本地运行正常
我的应用程序在 heroku 上成功部署,没有任何错误,但是当我访问我的应用程序的 url 时,它显示 We're sorry, but something went wrong.,当我使用 heroku logs -t 检查 heroku 日志时,它显示错误,我不知道出了什么问题,任何建议将不胜感激
我使用MySql 作为数据库
UPD:解决,只需要更新 gem 文件,因为 heroku 使用 Postgres 数据库。
gem 'pg', group: :production
gem 'mysql', group: :development
【问题讨论】:
-
Heroku 只支持 postgres 数据库,所以你必须在生产模式下使用 postgres 数据库。
-
你可以从mysql迁移到postgress:devcenter.heroku.com/articles/heroku-mysql
标签: mysql ruby-on-rails postgresql heroku