卸载 Rails 3.0.0 后,Rake 找不到 MySQL

发布于 2024-09-17 17:15:24 字数 858 浏览 6 评论 0原文

所以我以为我已经解决了这个问题中发布的问题,并且我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥抱我好吗 2024-09-24 17:15:24

我在安装后重新启动,一切又恢复正常了。因此,关键的解决方法是卸载并重新安装所有内容,然后重新启动以使更改生效。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文