Im using gem mysql2 to connect to a MySQL database in my ruby code. In my Gemfile i have gem 'mysql2', '~> 0.2.11'.But the reconnect method does not work. It says undefined method reconnect for #<Mysql2::Client:0x8e8da0c> (NoMethodError).So when the mysql server goes down, inspite of me having a loop which waits for some time and then tries to reconnect, the application crashes with the above error. Why does the reconnect method not work ?
Thank You
Fixed it using the :reconnect flag to Mysql2::Client.new as shown at https://github.com/brianmario/mysql2#connection-options. reconnect method is not required and doesnt exist.