Rails3.1在windows连接Mysql的问题_Ruby_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > Ruby > Rails3.1在windows连接Mysql的问题

Rails3.1在windows连接Mysql的问题

 2011/12/28 17:55:55  lxiaodao  http://lxiaodao.iteye.com  我要评论(0)
  • 摘要:Whenrunrailsserver,gettheerror(alreadyinstallnewestRailsInstallerofwindowsxpandmysql2-0.3.11-x86-mingw32):d:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in`require'
  • 标签:Windows rails rails3 问题 连接 SQL MySQL
When run rails server,get the error(already install newest RailsInstaller of windows xp and mysql2-0.3.11-x86-mingw32) :
d:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/l
ib/mysql2/mysql2.rb:2:in `require': Incorrect MySQL client library version! This
 gem was compiled for 6.0.0 but the client library is 5.0.16. (RuntimeError)
......

There is a easy way to let RailsInstaller(Ruby1.9.2)  use mysql-connector-c-6.
(1)download mysql-connector-c-noinstall-6.0.2-win32.zip
(2)Unzip the mysql-connector-c-noinstall-6.0.2-win32.zip and copu mysql-connector-c-noinstall-6.0.2-win32\lib\libmysql.dll to RailsInstaller\Ruby1.9.2\bin
Then run rails server,every thing is ok.
发表评论
用户名: 匿名