Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use gem mysql2 with rails 2.3?

I can't find anything related to how to use mysql2 with rails 2.3. Is it possible to use these two together? I want to use mysql2 since I think it would help the performance my rails 2.3 app.

like image 377
Chamnap Avatar asked Mar 10 '11 03:03

Chamnap


2 Answers

mysql2 gem works fine with my rails 2.3.5 but you need to use 0.2.* version of the gem

gem install mysql2 -v=0.2.6 
like image 53
Giridhar Bandi Avatar answered Nov 07 '22 10:11

Giridhar Bandi


I got the Task not supported by 'mysql2' error after upgrading a rails app from 2.3.5 to 2.3.8. The error occurs when rake tasks such as db:test:purge are invoked.

To fix this, feel free to download my version from https://github.com/zubin/rails/tree/v.2.3.8.mysql2 into vendor/rails.

like image 2
Zubin Avatar answered Nov 07 '22 10:11

Zubin