I get this error
`establish_connection\': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record
If anybody still facing problem of installing mysql2 gem with rails 3 on Windows, then refer to the detailed steps of installation on -
http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html
This also fixed the issue I had with:
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter)
You actually need to run: gem install mysql2 and add the gem to your config.
I had the same error after upgrading from Ubuntu 11.10 to 12.04. This is how I fixed the problem:
gem uninstall mysql2
bundle
I think the key here is the 'native extensions' -- I suppose when I installed last, I was using a different version of mysql.
Installing mysql2 (0.3.11) with native extensions
Also need to change adapter from mysql
to mysql2
in database.yml as said here
Install mysql2 gem on Snow Leopard for Rails 3 with rvm
From:
development:
adapter: mysql
To:
development:
adapter: mysql2
Same issue for me too. Upgraded to Rails 3.1.rc4 then downgraded to 3.0.3. Worked for me.