0

コマンドを実行するrake db:create と、次のメッセージが表示されます。

Couldn't create database for {"password"=>"secret1", "username"=>"root", "host"=>"localhost", "database"=>"zooz_development", "encoding"=>"utf8", "port"=>3307,
"adapter"=>"mysql"}, charset: utf8, collation: utf8_unicode_ci (if you set the c
harset manually, make sure you have a matching collation)

私は win7 で作業しています mysql はポート 3307 で作業しています mysql gem をインストールしました。これが私の database.yml ファイルです。

    development:
  adapter: mysql
  encoding: utf8
  database: zooz_development
  username: root
  password: secret1
  port: 3307
  host: localhost




# 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: mysql
  encoding: utf8
  database: chmaysa_test
  username: root
  password: secret1
  port: 3307
  host: localhost


production:
  adapter: mysql
  encoding: utf8
  database: zooz_development
  username: root
  password: secret1
  port: 3307
  host: localhost
4

1 に答える 1

0

試す:

これを Gemfile に追加します。 gem 'mysql2'

アダプターをからmysqlに変更しますmysql2

于 2013-03-27T18:58:07.340 に答える