views:

421

answers:

2

ruby 1.8.7 gem 1.3.7 rails 3.0.0, 3.0.0.rc

when i write rails -v error message come

Could not find gem 'mysql2 <>=0, runtime>' in any of the gem sources. Try running 'bundle install'.

when I run bundle install then also it cann't install mysql2

please help me.

+2  A: 

The mysql2 gem does not currently support Windows (although I hear they are working on it). Just use the old mysql gem for now.

To be specific:

  1. Put this line in your Gemfile:

    gem 'mysql', '2.8.1'

  2. Run bundle install

  3. Make sure you use adapter: mysql and not adapter: mysql2 in your database.yml.

This is how my system is currently set up, and it works fine with Rails 3.0.0.

Daniel Abrahamsson
To note, you will need to replace `mysql2` with `mysql` in your `database.yml` file.
Garrett
Thank you Daniel
manish nautiyal
A: 

Thank you Daniel

Please tell me how can I use old mysql gem.

Bcoz my rail version 3.0.0.rz is working and rails old version 2.3.8 is also working well with mysql but 3.0.0 is not working.

manish nautiyal