首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > Ruby Rails >

RuntimeError (! Missing the mysql2 gem. Add it to your Gemfile: gem ‘mysql2′)

2012-11-23 
RuntimeError (!!! Missing the mysql2 gem. Add it to your Gemfile: gem ‘mysql2′):在Rails3 出现这个错

RuntimeError (!!! Missing the mysql2 gem. Add it to your Gemfile: gem ‘mysql2′):

在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!

热点排行