I am working on windows rails application . I have created rb file for that application.
I am able to connect to mysql via appliction but when I am trying to connect it via ruby code , error is coming for connecting mysql. I am working on the production mode .
Running production mode rails application openning the mysql connection but not rb file out of application . I am using database.yml to connect th mysql.
This system is working fine on the windows xp but not on windows 7 Here is a code
require "yaml"
require 'mysql2'
config = YAML::load_file("config/database.yml")["production"]
client = Mysql2::Client.new(config)
Here is the error
Mysql2::Error: Can't connect to MySQL server on 'localhost' (10061)