After upgrading from Rails 2.0.2 to 2.3.5 my WEBrick server in NetBeans started printing the following message on its log and the application would not connect to the database.
The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
I installed the refered gem but would still have the same problem when starting WEBrick, even after restart of the IDE.
After surfing for a little while I found the solution on this page: http://forums.aptana.com/viewtopic.php?f=20&t=7563. I've copied the content below hoping people would find the solution faster than me by having more pages indexed in the search engines.
If at any point when you've upgraded to Rails 2.2. you get the following error on Windows:
"!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql."
the problem is because MySQL 5.1 client library doesn't play well with Rails - the solution is simple however:
- download older MySQL client library, for example one from InstantRails: http://instantrails.rubyforge.org/svn/t ... bmySQL.dll
- copy the downloaded file to C:\Ruby\bin (or wherever you installed Ruby)
- restart MySQL server
That's it! Just thought I'd share this with others, lost me an hour of researching.
Good luck!
Note: I tested and this will work for rails 2.2.2 too.
Comments
Thank you!
Thank you a thousand time and one for sharing that!
After long struggles I found that post and it got up and running immediatelly.
I appreciate that very much!
thanks a lot.this works.
thanks a lot.this works.