无法执行rake db:schema:dump

时间:2015-02-05 19:57:19

标签: mysql ruby-on-rails database

我正在研究一个RoR应用程序,并尝试在我的database.yml文件中建立一个连接到我的mysql数据库。我现在只想连接到我的开发环境。使用我授予读/写访问权限的用户名simple_cms,db是“simple_cms_development”。

但是我收到以下错误,发出rake db:schema:dump命令:

DEPRECATION WARNING: config.whiny_nils option is deprecated and no longer works. (called from block in <top (required)> at /apps/RubyStuff/Sites/simple_cms/config/environments/development.rb:10)
DEPRECATION WARNING: The Active Record auto explain feature has been removed.

To disable this message remove the `active_record.auto_explain_threshold_in_seconds`
option from the `config/environments/*.rb` config file.

See http://guides.rubyonrails.org/4_0_release_notes.html for more information.

进一步说明,我的database.yml文件:

# MySQL.  Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
#   gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
#   gem 'mysql2'
#
# And be sure to use new-style password hashing:
#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: simple_cms_development
  pool: 5
  username: simple_cms
  password: secretpassword
  socket: /var/lib/mysql/mysql.sock

# 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:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: #simple_cms_test
  pool: 5
  username: root
  password:
  socket: /var/lib/mysql/mysql.sock

production:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: #simple_cms_production
  pool: 5
  username: root
  password:
  socket: /var/lib/mysql/mysql.sock

我也成功安装了我的mysql2 gem。发出rake db:schema:dump时为什么会出现此错误?

0 个答案:

没有答案