卸载 Rails 3.0.0 后,Rake 找不到 MySQL
所以我以为我已经解决了这个问题中发布的问题,并且我使用 sudo gem uninstall Rails -v 3.0.0 卸载了 Rails 3.0.0,但后来我遇到了其他问题。我将 rogerdpack 的建议提升到了一个不同的水平,卸载了所有的 ruby gems 和 mysql,然后重新安装了它们。现在我得到以下信息:
Icarus:temporary atg$ rails shopping -d mysql
create ........
Icarus:temporary atg$ cd shopping/
Icarus:shopping atg$ rake db:create
(in /Users/atg/temporary/shopping)
Couldn't create database for {"reconnect"=>false, "encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "database"=>"shopping_development", "pool"=>5, "password"=>nil, "socket"=>"/tmp/mysql.sock"}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation)
这是什么意思以及如何解决它?
感谢所有帮助并提前致谢!
So I thought I had fixed the problem posted in this question and I uninstalled Rails 3.0.0 with sudo gem uninstall rails -v 3.0.0
, but then I had troubles with other things. I took rogerdpack's advice to a different level and uninstalled all of my ruby gems and mysql, then reinstalled them. Now I get the following:
Icarus:temporary atg$ rails shopping -d mysql
create ........
Icarus:temporary atg$ cd shopping/
Icarus:shopping atg$ rake db:create
(in /Users/atg/temporary/shopping)
Couldn't create database for {"reconnect"=>false, "encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql", "database"=>"shopping_development", "pool"=>5, "password"=>nil, "socket"=>"/tmp/mysql.sock"}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation)
What does this mean and how can I fix it?
All help is appreciated and thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在安装后重新启动,一切又恢复正常了。因此,关键的解决方法是卸载并重新安装所有内容,然后重新启动以使更改生效。
I restarted after the install and everything worked again. So the key fix was to uninstall and reinstall everything, and then to restart so that changes can take effect.