7

I'm trying to create an app in Rails 3.1 with mysql2 v 0.2.6. When running rake db:create, I get the following error:

DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. 
Database adatpers should define a visitor_for method which returns the appropriate 
visitor for the database. For example, MysqlAdapter.visitor_for(pool) returns 
Arel::Visitors::MySQL.new(pool). (called from mon_synchronize at 
c:/Ruby192/lib/ruby/1.9.1/monitor.rb:201)

I can access the MySQL monitor, so the gem appears to be installed correctly. What else could be going on here?

Thanks!

Evan Cordell
  • 4,108
  • 2
  • 31
  • 47
Beth
  • 71
  • 1

2 Answers2

1

Try updating your msql gem.

In ./Gemfile

gem require 'mysql2', '~> 0.3.6'

bundle update mysql2

raavd
  • 11
  • 1
  • 1
    So this version of mysql2 does not want to install correctly...'failed to build native extension' and all that jazz. But 0.2.6 installed fine? – Beth Sep 30 '11 at 10:19
0

use the below specified version in gemfile.

gem 'mysql2', '~>0.3.10'

then run

bundle install
Amal Kumar S
  • 15,555
  • 19
  • 56
  • 88