0

I have a problem to use mysql with Ruby 2.0.0 and Windows 7 64bits...

I have only : require 'mysql' in my script.

Errors :

C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mysql/mysql_api (LoadError)
    from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mysql.rb:6:in `rescue in <top (required)>'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql-2.9.1-x86-mingw32/lib/mysql.rb:2:in `<top (required)>'
    from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from C:/5-recup_info/import.rb:4:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

And Sucessfully installed mysql-2.9.1-x86-mingw32 but it doesn't work.

It's to use infiniDB.

I found a solution which doesn't work... --platform=ruby in command install.

Thank you.

Alexis_user
  • 427
  • 5
  • 14
  • Looks like it's missing the MySQL dynamic libraries. How did you install MySQL itself? – tadman Jun 24 '14 at 16:02
  • No, I've installed InfiniDB (which works with Mysql) it works but not with Ruby... Do I have to install mysql 5 to use InfiniDB with ruby ? – Alexis_user Jun 25 '14 at 05:56
  • You might need to unless InfiniDB comes with the right dynamic libraries. It needs specific DLL files to link in and they may be named differently with that DB. – tadman Jun 25 '14 at 16:39
  • 1
    I've succeed installing mysql2 with connector/C of mysql and to copy/past the dll.. – Alexis_user Jun 26 '14 at 07:50
  • You should post an answer with more details about the specific steps you took so someone in the same situation as you can learn from it. – tadman Jun 26 '14 at 16:45
  • http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/ "Time to install MySQL/Ruby bindings" part. But I use "gem install mysql2 [...] instead of use 'mysql'. – Alexis_user Jun 27 '14 at 07:10

0 Answers0