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

[b] 1、会出现无法找到libmysql.dll错误[/b]

在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

[b]2、安装时候,会出现Mysql::Error: BLOB/TEXT column 'description' can't have a default value: ALTER TABLE `projects` CHANGE `description` `description` text DEFAULT ''[/b]
这个问题可以如下解决:
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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值