[英]installing mysql as a gem
i want to develop rails 3 apps using mysql on windows 7 (64 bit) and i have installed mysql via the msi download from the mysql site. 我想在Windows 7(64位)上使用mysql开发rails 3应用程序,我已经通过mysql站点的msi下载安装了mysql。
my question is that do i still need to install the mysql gem? 我的问题是,我还需要安装mysql gem吗?
thanks 谢谢
The mysql gem provides the ruby bindings, so yes, you need to install this. mysql gem提供了ruby绑定,所以是的,你需要安装它。
With Rails 3 you should use the mysql2 gem rather than the mysql gem. 使用Rails 3,您应该使用mysql2 gem而不是mysql gem。
Here is a proper solution for anyone interested, that doesn't mess up your current installation of mysql server 对于任何有兴趣的人来说,这是一个合适的解决方案,它不会搞砸你当前安装的mysql服务器
now run this command 现在运行此命令
gem install mysql2 -- '--with-mysql-lib="c:\\mysql-gem-install\\lib\\opt" --with-mysql-include="c:\\mysql-gem-install\\include"' gem install mysql2 - ' - with-mysql-lib =“c:\\ mysql-gem-install \\ lib \\ opt”--with-mysql-include =“c:\\ mysql-gem-install \\ include”'
I just installed mysql2 gem v. 0.3.7 我刚刚安装了mysql2 gem v.0.3.7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.