SoShellon 2013-10-20
在一台新的电脑上搭建railsmysql的程序,一切都还算顺利。但是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'veinstalledthebinaryversionofmysql2.
ItwasbuiltusingMySQLConnector/Cversion6.0.2.
It'srecommendedtousetheexactsameversiontoavoidpotentialissues.
Atthetimeofbuildingthisgem,thenecessaryDLLfileswhereavailable
inthefollowingdownload:
http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0
.2-win32.zip/from/pick
Andputlib\libmysql.dllfileinyourRubybindirectory,forexampleC:\Ruby\
bin
按照提示来。问题迎刃而解。