vendredi 13 octobre 2017

cannot load such file -- mysql2/2.4/mysql2 - Ruby 2.4

I have Ruby 2.4 and trying to install mysql2 . I follow the instructions from internet:

  1. gem uninstall mysql2 - if needed;
  2. download mysql connector;
  3. gem install mysql2 --platform=ruby -- '--with-mysql-lib="C:\conn\lib" --with-mysql-include="C:\conn\include"' and see message - 1 gem is installed;
  4. copy file libmysql.lib to rubyFolder/bin

If run rails s I see this message:

Could not find mysql2-0.4.8-x64-mingw32 in any of the sources Run bundle install to install missing gems.

and I do it - bundle, but after that, if I run again rails s I see same error:

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- mysql2/2.4/mysql2 (LoadError)

Aucun commentaire:

Enregistrer un commentaire