【发布时间】:2018-07-18 19:28:07
【问题描述】:
我是 RoR 的新手。我使用 ActiveAdmin 和 Devise 构建了一个小应用程序,我希望将它部署在 Heroku 上。
当我在 Heroku 上推送我的应用程序时,它运行正常,但数据库似乎是空的!实际上,当我尝试登录我的 ActiveAdmin 管理面板时,我的本地登录名不匹配...
此外,我的应用程序的其他数据库完全是空的...
我想我没有正确填写 database.yml,但我不知道应该怎么做...:/
Database.yml:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
如果您能帮助我或指导我找到解决方案,我将不胜感激!
感谢您的关注! ^^
【问题讨论】:
标签: ruby-on-rails database heroku