Reputation: 2594
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.
Upvotes: 3
Views: 5322
Reputation: 2223
This error can be handled now. No need to change mysql2 to mysql in Gemfile and database.yml. You can install mysql2 gem on windows by following the steps given in post - http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html
Upvotes: 3
Reputation: 1975
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:
Put this line in your Gemfile:
gem 'mysql', '2.8.1'
Run bundle install
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.
Upvotes: 5