MySQL gem 问题 - 未定义的方法 `init'对于Mysql:类
可能的重复:
'Mysql:Class 的未定义方法初始化'
这是我持续存在的问题的一部分升级到雪豹后就有了。
我重新安装了 MySQL、Ruby 和 Rails。现在,当我运行 Rails 服务器并转到 localhost:3000 时,我得到:
undefined method `init' for Mysql:Class
我正在运行
红宝石1.8.7
Rails 3.0.3
MySQL 5.5.8
我的 GemFile 中有 gem 'mysql'。
我无法弄清楚问题所在。有人可以帮忙吗?
Possible Duplicate:
'undefined method init for Mysql:Class'
This is part of an ongoing problem I've had after upgrading to Snow Leopard.
I've reinstalled MySQL, Ruby and Rails. Now when I run rails server and go to localhost:3000 I get:
undefined method `init' for Mysql:Class
I'm running
Ruby 1.8.7
Rails 3.0.3
MySQL 5.5.8
I have gem 'mysql' in my GemFile.
I can't figure out the problem. Can somebody help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须删除并使用新的 ruby 本机扩展绑定重新安装 mysql gem。
使用 sudo 尝试此命令。
You have to remove and then reinstall the mysql gem with the new ruby native extensions bindings.
Try this command with a sudo.