后来我用IDE了,里面的命令是:
D:\Ruby1.9.2\Ruby192\bin\rake db:migrate
rake aborted!
Can't connect to MySQL server on 'localhost' (10061)
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
请大家帮个忙,给我点建议和帮助,帮我带上路,谢谢! ------解决方案-------------------- >gem list
看看有 这个gem没有。
mysql2 (0.2.6 x86-mingw32)
没有就gem install mysql2 ------解决方案-------------------- 你MySQL可能没开 ------解决方案-------------------- maybe you can add 'host: loaclhost' in your database.yml. but this isn't mandatory. default value is localhost.
rake db:create
this command will create development and test database in your mysql server. the error message has told you. you cannot connect mysql server.
so, first you need to check mysql server status.
make sure mysql is running and you can access your mysql server from you local machine.
second, you need to check mysql rubygem, make sure it has been installed.
you can use 'gem list' to check it.
third, make sure the 'ruby_project_development' exists in your mysql database. 'rake db:create' this command will create it.
hope this is helpful for you.