BTHarris
BTHarris

Reputation: 299

This version of mysql2 (0.2.18) isn't compatible with Rails 3.1

Any help would be greatly appreciated, when I run the "generate model" command I get the following message:

 WARNING: This version of mysql2 (0.2.18) isn't compatible with Rails 3.1 as the ActiveRecord adapter was pulled into Rails itself.
 WARNING: Please use the 0.3.x (or greater) releases if you plan on using it in Rails >= 3.1.x 

Is there a way to update the mysql2 version so it works with rails 3.1? or perhaps i could downgrade rails from 3.1 to 3.0?

Upvotes: 3

Views: 2982

Answers (2)

kenstrong
kenstrong

Reputation: 11

I had the same problem even after upgrading. It kept refusing to use 0.3.11 and defaulted back to the earlier version.

Finally figured out that in the Gemfile I had it written "< 0.3" instead of "> 0.3".

Kind of obscure (and dumb), but maybe it'll help someone.

Upvotes: 1

Dieseltime
Dieseltime

Reputation: 972

You need to run

gem update mysql2

or add

gem "mysql2", "~> 0.3.11"

to your Gemfile and run bundle install

Upvotes: 10

Related Questions