ruby mysql 找不到指定程序 mysql2.so

在一台新的电脑上搭建rails mysql的程序,一切都还算顺利。但是mysql2的gem安装完后出现了下面的问题:

127: 找不到指定的程序。   - C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems
/mysql2-0.3.11/lib/mysql2/mysql2.so

然后手忙脚乱的google找解决方案。未果。

最后重新安装了一下mysql2的gem. 发现安装的时候其实给了提示的:

  You've installed the binary version of mysql2.
  It was built using MySQL Connector/C version 6.0.2.
  It's recommended to use the exact same version to avoid potential issues.

  At the time of building this gem, the necessary DLL files where available
  in the following download:

  http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0
.2-win32.zip/from/pick

  And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\
bin


按照提示来。问题迎刃而解。

你可能感兴趣的:(mysql,Ruby,mysql2 gem)