Произошла ошибка при настройке базы данных mysql на производстве

Я пытаюсь запустить команду

rake db:setup RAILS_ENV="production"

Но выдает следующую ошибку:

DEPRECATION WARNING: Passing a string to ActiveRecord::Base.establish_connection for a configuration lookup is deprecated, please pass a symbol (:mysql) instead. (called from call at /home/huzefa/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:240)
rake aborted!
ActiveRecord::AdapterNotSpecified: 'mysql' database is not configured. Available: ["default", "development", "test", "production", "adapter", "encoding", "reconnect", "database", "pool", "username", "password", "host"]
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:231:in `resolve_string_connection'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:213:in `resolve_connection'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:139:in `resolve'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:151:in `block in resolve_all'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:150:in `each'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:150:in `resolve_all'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/connection_handling.rb:69:in `resolve'
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/core.rb:46:in `configurations='
/home/huzefa/.rvm/gems/ruby-2.2.3/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:5:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create => db:load_config

Мой database.yml файл выглядит следующим образом:

default: &default
  adapter: sqlite3
  pool: 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:
adapter: mysql
encoding: utf8
reconnect: false
database: depot_production
pool: 5
username: huzefa
password: huzefa
host: localhost

Чего здесь не хватает, что не позволяет мне установить базу данных mysql в производство? , пожалуйста, если кто-нибудь может мне помочь, было бы очень нужно. Спасибо :)

0
задан 17 November 2015 в 09:56

1 ответ

Решенный как были ошибки добавления отступа в database.yml файл.

0
ответ дан 17 November 2015 в 19:56
  • 1
    это doesn' t работа; мой splashscreen похож пуст, фиолетовый как человечность splashcreen, и ничего не происходит. Я должен был перезапустить и заменять снова acpi=off. Я выполняю ядро 4.4 – chicken burger 8 February 2017 в 03:52

Другие вопросы по тегам:

Похожие вопросы: