error:- mysql2 adapter: `gem install activerecord-mysql2-adapter`

The error while I got while working with rails version 3.0.7 is

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

Solution:-

In GemFile change

gem ‘mysql2’ to gem ‘mysql2’, ‘< 0.3’

and bundle it.

 

http://www.klairvoyant.in

Follow klairvoyantinfo on Twitter

klairvoyant Infosolutions on LinkedIn

for klairvoyant

Advertisements
This entry was posted in rails, ROR, ruby on rails and tagged , , , . Bookmark the permalink.

5 Responses to error:- mysql2 adapter: `gem install activerecord-mysql2-adapter`

  1. hyperrjas says:

    Where are GemFile?

    I only see Gemfile and Gemfile.lock

    Thank you

  2. rishta says:

    zOMG thanks, man

  3. Anand says:

    Hi ,

    I am a rooke in ROR… plz can you tell me is this the gem file found in the mysql2 gem folder??

    Content of gem file :
    source :rubygems

    gemspec

    i am not able to find gem ‘mysql2′ in this…

    Also plz can you tell me how to run bundle command.

    I am using Ubuntu 11.04 | rails 3.0.7

    • 1) here the Gemfile means file found in the top directory( which will created while creating rails application) . it’s a text file and you want to edit content of the file.

      2) In NetBeans IDE you will get the command in the right button click on project name

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s