ActiveRecord… activerecord-mysql-adapter

前端 未结 4 2123
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-20 07:12

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

4条回答
  •  借酒劲吻你
    2021-02-20 07:53

    1. I issued bundle install command, which didn't resolve the issue

    2. I found the gemfile located in c:\Sites\<>\Gemfile

    3. Added gem 'mysql' to the file by editing it in notepad++

    4. Then checked whether Mysql is avilable in the bundle using bundle show mysql

    5. After which when i issued rake db:create , I got specified file could not be found error which is was referring to libmysql.dll

    6. 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/

    7. 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.

提交回复
热议问题