Я пытаюсь запустить rake db:drop db:create db:migrate
в своей среде разработки, но после выполнения следующего я получаю сообщение об ошибке:
$ rails about
audited 11 packages in 0.474s
found 0 vulnerabilities
About your application's environment
Rails version 5.2.3
Ruby version 2.5.5-p157 (x86_64-darwin18)
RubyGems version 2.7.6.2
Rack version 2.0.7
JavaScript Runtime Node.js (V8)
Middleware Rack::Cors, Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, ActionDispatch::RemoteIp, Rails::Rack::Logger, ActionDispatch::ShowExceptions, WebConsole::Middleware, ActionDispatch::DebugExceptions, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActionDispatch::Cookies, ActionDispatch::Session::ActiveRecordStore, ActionDispatch::Flash, ActionDispatch::ContentSecurityPolicy::Middleware, Rack::Head, Rack::ConditionalGet, Rack::ETag, Rack::TempfileReaper, Warden::Manager, Mailjet::Rack::Endpoint, ScoutApm::Middleware, ScoutApm::Instant::Middleware, Bullet::Rack
Application root ROOT
Environment development
Database adapter postgresql
Database schema version 20190910214159
$ RAILS_ENV=development rake db:drop db:create db:migrate
audited 11 packages in 0.495s
found 0 vulnerabilities
rake aborted!
ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
If you are sure you want to continue, run the same command with the environment variable:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
Tasks: TOP => db:drop => db:check_protected_environments
(See full trace by running task with --trace)
Есть идеи, почему он пытается выполнить команду в моей производственной базе данных?
Вот мой database.yml:
development:
adapter: postgresql
encoding: unicode
database: development-database
url: postgres:///development-database
pool: 5
username: name
host: localhost
production:
adapter: postgresql
encoding: unicode
database: production-database
user: name