开发者

No database created

开发者 https://www.devze.com 2023-02-22 12:59 出处:网络
rake db:create doesn\'t return any errors but no database is created. When I run rake db:migrate, I get the error message \"rake aborted, unknown database\".

rake db:create doesn't return any errors but no database is created. When I run rake db:migrate, I get the error message "rake aborted, unknown database".

I'm using MySQL2, Rails 2.3.11, Ruby 1.9.2

And here are the contents of my database.yml

development:
  adapter: mysql2
  database: diana_development
  username: root
  passw开发者_开发技巧ord:
  port: 3306
  host: localhost

My temporary solution is to create the database manually, and the the rake db:migrate runs fine. But this problem is bugging me and I want to know what's really wrong. Any ideas? :)


try to use rake db:create first


I believe that this problem has something to do with the change in yaml parsers from syck to psych between ruby-1.8 and ruby-1.9.

I have run into this myself but, as yet, have no solution to the difficulty.

If you switch to 1.8.7 (using rvm for instance) and run your rake db:tasks then I expect that they will work. This is what I am doing as a work around for now.

0

精彩评论

暂无评论...
验证码 换一张
取 消