安装redmine1.0版本时候,出现2个错误,处理方式如下:

1、会出现无法找到libmysql.dll错误

在Windows下,如果使用了mysql5.1,不但在安装mysql.gem时候会报ri和rdoc的错误,而且在执行rakedb:migrate时候也会报错:

这是由于mysql5.1里面所带的libmySQL.dll和rails不兼容(至少在2.3.5还是如此)。可以从网上下载一个旧版本的libmySQL.dll,将其放到ruby的bin目录即可。

下载地址:

http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll

2、安装时候,会出现Mysql::Error:BLOB/TEXTcolumn'description'can'thaveadefaultvalue:ALTERTABLE`projects`CHANGE`description``description`textDEFAULT''

这个问题可以如下解决:

Ithinkyourprobleminissuescontrollerisnotthesamequestionwithmymigrationerror.

toJPLang:

Ihaveresolvedmymigrationerrorbysomeirregularmethod.Pleasenote:

1.MySQL5.0and5.1willnotallowdefaultvalueforBLOB/TEXTcolumn.

2.IfMySQLisworkinginstrictmode,itwillreportanerroronaTEXTcolumn'sdefaultvalueandstop.Whileifitsworkmodeisnotstrictmode(maybesql_mode=""),itwilljustgiveoutawarninginsteadofanerrorandthesqlcommandwillbeexecutedsuccessfully.

3.MySQL5.0binaryinstalledonwindowswillworkinstrictmodeindefault.Whileitwillnotworkinstrictmodeonlinuxcompiledfromsource.(I'mnotsurewithlinuxbecauseIusewindowsxp)

4.Somaybemostoftheredmine'suserswouldn'tencounterthisproblem...

So,towindowsusersofredmine,ifyouhaveencounteredmyproblem,thereisasolution:

1.findyourmysqlserver'sinifile,willbe"MySQL\MySQLServer5.0\my.ini"indefault.,找到my.ini文件

2.locatethisline:sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

3.adda"#"tothehead:#sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

4.restartmysqlserver

5.runrakedb:migrate,itshouldsucceedthistime

6.changethemy.inifilebackandrestartmysqlserver

相关推荐