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

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

    在Windows下,如果使用了mysql 5.1,不但在安装mysql.gem时候会报ri和rdoc的错误,而且在执行 rake db: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/TEXT column 'description' can't have a default value: ALTER TABLE `projects` CHANGE `description` `description` text DEFAULT ''
这个问题可以如下解决:
I think your problem in issues controller is not the same question with my migration error.

to JP Lang:
I have resolved my migration error by some irregular method. Please note:
1. MySQL 5.0 and 5.1 will not allow default value for BLOB/TEXT column.
2. If MySQL is working in strict mode, it will report an error on a TEXT column's default value and stop. While if its work mode is not strict mode(maybe sql_mode=""), it will just give out a warning instead of an error and the sql command will be executed successfully.
3. MySQL 5.0 binary installed on windows will work in strict mode in default. While it will not work in strict mode on linux compiled from source.(I'm not sure with linux because I use windows xp)
4. So maybe most of the redmine's users wouldn't encounter this problem...

So, to windows users of redmine, if you have encountered my problem, there is a solution:
1. find your mysql server's ini file, will be "MySQL\MySQL Server 5.0\my.ini" in default.,找到my.ini文件
2. locate this line: sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
3. add a "#" to the head: #sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
4. restart mysql server
5. run rake db:migrate, it should succeed this time
6. change the my.ini file back and restart mysql server

猜你喜欢

转载自wmcxy.iteye.com/blog/743968