1

I am installing ruby by following these video -

https://www.youtube.com/watch?v=y0X7SUfF928&list=PLcwklDOKWhc-k8VsT-ixbAY0TdQI5JLoW

previosly I was getting these error

incorrect mysql client library version this gem was compiled for 6.0.0

then I followed this link mysql2 gem compiled for wrong mysql client library

but now i am getting these -

c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require
': cannot load such file -- mysql2/mysql2 (LoadError)
        from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:5
5:in `require'
        from c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2.rb
:8:in `<top (required)>'
        from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:1
35:in `require'
        from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:1
35:in `rescue in require'
        from c:/row/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:1
44:in `require'
        from test.rb:1:in `<main>'

Please help me out .. .

Community
  • 1
  • 1

2 Answers2

1

Looks like you might have the wrong version of MYSQL C-Connector library installed

You'll need this one: enter image description here

Basically, Windows 7 doesn't come with any MYSQL header files required to help the gem run. You'll need to install the 32-bit ver of MYSQL C-Connector, and then use this command to install the gem:

gem install mysql2 —platform=ruby — ‘—with-mysql-dir=”C:\mysql-connector-path”’
Richard Peck
  • 76,116
  • 9
  • 93
  • 147
0

In that video they have mentioned one file row.bat

I have just changed the sequence of lines..

set PATH=c:\windows\system32;c:\windows
set PATH=%PATH%;C:\row\mysql-connector-c-noinstall-6.0.2-win32\lib
set PATH=%PATH%;c:\row\Ruby200\bin
set PATH=%PATH%;C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin
start "Rails on windows" /D c:\row

And its working now