I get this error
`establish_connection': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter) (RuntimeError)
from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activerecord-
Here is dump of whole error and my config and gemfile.
I had the same error after upgrading from Ubuntu 11.10 to 12.04. This is how I fixed the problem:
I think the key here is the 'native extensions' -- I suppose when I installed last, I was using a different version of mysql.
Same issue for me too. Upgraded to Rails 3.1.rc4 then downgraded to 3.0.3. Worked for me.
the missing file (
no such file to load
) can be found in the pre 0.3.0 versions of mysql2.quoted from the documentation of mysql2
This also fixed the issue I had with:
You actually need to run: gem install mysql2 and add the gem to your config.
I was getting the same error while using rails 3.0.7 and mysql2 0.3.2. The solution, which I found here, is to use an older version of mysql2. Thus edit your gemfile to
and run
Did you include the mysql2 gem in your gemfile instead of the old mysql gem, and ran bundle install afterwards?