I’m using the mysql (2.8.1 x86-mingw32) gem and MySQL Server version
5.0.90 on Windows 7, 64 bit. I’m also using ruby 1.8.7.
When I run the following script (replacing user name and password
dbh = Mysql.real_connect(“localhost”, “user”, “pass”, “test”)
puts "Server version: " + dbh.get_server_info
I get the following error message:
./test.rb:3: uninitialized constant Mysql (NameError)
gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:inrequire’
Exit code: 1
Can anyone give me a pointer as to what is going wrong?
I have tried googling the error message, but with no luck.
I have also read the documentation installed with the gem and as far as
I can tell I am using the correct syntax.
Thanks in advance.