[quote]
[url]http://stackoverflow.com/questions/3608287/installing-mysql2-gem-for-rails-3[/url]
[url]https://github.com/brianmario/mysql2[/url]
[/quote]
vi Gemfile
执行bundle
vi config/datebase.yml
[url]http://stackoverflow.com/questions/3608287/installing-mysql2-gem-for-rails-3[/url]
[url]https://github.com/brianmario/mysql2[/url]
[/quote]
sudo apt-get install libmysql-ruby libmysqlclient-dev
gem install mysql2
vi Gemfile
gem 'mysql2', '< 0.3'
执行bundle
bundle install
vi config/datebase.yml
env:
adapter: mysql2
database: ***
username: ***
password: ***
host: localhost
encoding: utf8