之前在豆瓣上写的一篇文章,这里也记录一下:
安装redmine手册
官方链接http://www.redmine.org/projects/redmine/wiki/RedmineInstall
OS: Mac OS 10.6.8 and Ubuntu10.04
记录一下遇到的问题:
1.安装mysql的的时候,用gem install mysql一直都是报错的,内容如下:
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib
--without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlib
解决办法
gem install ruby-mysql
2. 在设置database.yml的时候,设置的密码前面要加上空格,否则执行RAILS_ENV=production rake db:migrate时,会报一个utf-8的异常信息
3. 执行RAILS_ENV=production rake db:migrate 出错,如下
rake aborted!
No such file or directory - /tmp/mysql.sock
看现象应该是没有找到mysql的监听,在database.yml中添加
socket: /var/run/mysqld/mysqld.sock
结果如下
adapter: mysql
database: redmine
host: localhost
username: root
password: nopaass
encoding: utf8
socket: /var/run/mysqld/mysqld.sock
安装redmine手册
官方链接http://www.redmine.org/projects/redmine/wiki/RedmineInstall
OS: Mac OS 10.6.8 and Ubuntu10.04
记录一下遇到的问题:
1.安装mysql的的时候,用gem install mysql一直都是报错的,内容如下:
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib
--without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlib
解决办法
gem install ruby-mysql
2. 在设置database.yml的时候,设置的密码前面要加上空格,否则执行RAILS_ENV=production rake db:migrate时,会报一个utf-8的异常信息
3. 执行RAILS_ENV=production rake db:migrate 出错,如下
rake aborted!
No such file or directory - /tmp/mysql.sock
看现象应该是没有找到mysql的监听,在database.yml中添加
socket: /var/run/mysqld/mysqld.sock
结果如下
adapter: mysql
database: redmine
host: localhost
username: root
password: nopaass
encoding: utf8
socket: /var/run/mysqld/mysqld.sock