This is driving me farking insane.
I\'m trying to create a simple beginner app utilizing ActiveRecord to do simple database tasks. I\'m NOT using rails.
I keep g
I issued bundle install command, which didn't resolve the issue
I found the gemfile located in c:\Sites\<>\Gemfile
Added gem 'mysql' to the file by editing it in notepad++
Then checked whether Mysql is avilable in the bundle using bundle show mysql
After which when i issued rake db:create , I got specified file could not be found error which is was referring to libmysql.dll
You can find the same in your mysql installation or you can download from the link http://www.vertstudios.com/blog/libmysqldll-32-bit-download/
Copy that file to the Ruby directory bin folder. In My case I was using rubyinstaller so it was C:\RailsInstaller\Ruby1.9.3\bin
Voila. That's done.
^Note that the download link might lead to an incorrect library version. In which case, it's best to follow the link given in the message you get right after installing the mysql(2) gem to get the correct library version, otherwise it still won't work.
Not sure if this is your problem but try using the adapter: mysql2
driver. It's the recommended anyway since it's way faster than the standard mysql
one.
Do you still get the same issue?
After hours of fighting with this issue, Tallboy's answer worked for me on OS X:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
Unfortunately his answer was hidden in one of the comments above; you have to click the link to expand the comment. I was getting the error message "undefined method 'init' for Mysql:Class"
We faced the same problem (because we switch from jruby to ruby)
Solved with :