Install mysql2 gem on Snow Leopard for Rails 3 with rvm

本小妞迷上赌 提交于 2019-11-28 18:38:17

I actually had the wrong adaptor set on my database.yml

So the fix is

development:
  adapter: mysql2
  database: development_database
  username: root
  password:

Instead of

adapter: mysql

Doh!

If you're seeing this recently, it's because mysql2 0.3 removed the ActiveRecord Adapter, which is now part of Rails 3.1

WARNING: This version of mysql2 (0.3.2) doesn't ship with the ActiveRecord adapter bundled anymore as it's now part of Rails 3.1
WARNING: Please use the 0.2.x releases if you plan on using it in Rails <= 3.0.x

Adjust your Gemfile accordingly if you're on Rails 3.0.x

gem 'mysql2', '~> 0.2.6'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!