Agile Otaku

Please install the mysql2 adapter: 'gem install activerecord-mysql2-adapter'

I am a beginner of ruby on rails. Unfortunately rails 3.0 seems to have many changes in its command line, so most of the tutorials I am reading are not updated.

Today I was trying to use mysql into my application, so I did

$ gem install mysql2

Unfortunately i get

Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter)

In rails 3, a new bundle manager is being used, therefore we need to add the vim declaration in [application root]/Gemfile

Edit the Gemfile and add the following

$ gem 'mysql2','<0.3'

Save. If 'bundle' is not yet installed, do a

$ gem install bundle

first. Then update your bundles

bundle install

It should fix this issue.

If you want to learn more about "bundle" go to