Rails3.1在windows连接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.

你可能感兴趣的:(mysql,windows,Ruby,Rails,rails3.1)