在Rails3 出现这个错误,做以下工作:
1. 在Gemfile
gem 'mysql2', '~> 0.2.6'
2.
bundle update
3. 在datababse.yml
development:
adapter: mysql2
encoding: utf8
database: devise
# pool: 5
username: root
password:
reconnect: true
socket: /tmp/mysql.sock
参考: http://stackoverflow.com/questions/4297253/install-mysql2-gem-on-snow-leopard-for-rails-3-with-rvm
If you enjoyed this post, make sure you subscribe to my RSS feed!
本文介绍了解决Rails3应用中安装mysql2 gem的问题步骤。主要包括:更新Gemfile指定mysql2版本,运行bundle update命令,以及在database.yml文件中正确配置mysql2数据库连接参数。
13万+

被折叠的 条评论
为什么被折叠?



