我正在尝试将我的数据库环境设置为,staging
但出现此错误:
$ bin/rails db:environment:set RAILS_ENV=staging
rails aborted!
ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter
/Users/bfruitman/workspace/hired/config/environment.rb:5:in `<top (required)>'
/Users/bfruitman/workspace/hired/bin/rails:9:in `<top (required)>'
/Users/bfruitman/workspace/hired/bin/spring:14:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:environment:set => environment
(See full trace by running task with --trace)
我已经有一个条目database.yml
:
staging:
<<: *heroku
但这显然还不够好。我应该在哪里定义staging
?