i am using ruby 1.9.3 and MySQL server 5.1
i am creating ruby files in ruby mine editor 7.1.4.
I am getting error in below code
require ‘rubygems’
require ‘mysql’
begin
db = Mysql.real_connect(“localhost”, “root”, “tiger”,“test”)
puts "Server version: " + db.get_server_info
rescue Mysql::Error => e
puts “Error code: #{e.errno}”
puts “Error message: #{e.error}”
puts “Error SQLSTATE: #{e.sqlstate}” if e.respond_to?(“sqlstate”)
ensure
db.close if db
end
while running the above code
it showing the below error
:in `require’: cannot load such file – mysql (LoadError)
I am not able to connect with MySQL.