title: Issues while connecting to mysql using ruby
body: <pre><code>require 'rubygems'
  require 'mysql'
  db = Mysql.connect('localhost', 'root', '', 'mohit')
  //db.rb:4: undefined method `connect' for Mysql:Class (NoMethodError)
  //undefined method `real_connect' for Mysql:Class (NoMethodError)
  db.query("CREATE TABLE people ( id integer primary key, name varchar(50), age integer)")
  db.query("INSERT INTO people (name, age) VALUES('Chris', 25)")
  begin
   query = db.query('SELECT * FROM people')
   puts "There were #{query.num_rows} rows returned"
    query.each_hash do |h| 
       puts h.inspect
  end
  rescue
   puts db.errno
   puts db.error 
  end
  </code></pre>
  
  <p>error i am geting is:</p>
  
  <pre><code>    undefined method `connect' for Mysql:Class (NoMethodError)
                      OR 
     undefined method `real_connect' for Mysql:Class (NoMethodError)
  </code></pre>
  
  <p><strong>EDIT</strong>
        return value of Mysql.methods</p>
  
  <pre><code>      ["private_class_method", "inspect", "name", "tap", "clone", "public_methods", "object_id", "__send__", "method_defined?", "instance_variable_defined?", "equal?", "freeze", "extend", "send", "const_defined?", "methods", "ancestors", "module_eval", "instance_method", "hash", "autoload?", "dup", "to_enum", "instance_methods", "public_method_defined?", "instance_variables", "class_variable_defined?", "eql?", "constants", "id", "instance_eval", "singleton_methods", "module_exec", "const_missing", "taint", "instance_variable_get", "frozen?", "enum_for", "private_method_defined?", "public_instance_methods", "display", "instance_of?", "superclass", "method", "to_a", "included_modules", "const_get", "instance_exec", "type", "&lt;", "protected_methods", "&lt;=&gt;", "class_eval", "==", "class_variables", "&gt;", "===", "instance_variable_set", "protected_instance_methods", "protected_method_defined?", "respond_to?", "kind_of?", "&gt;=", "public_class_method", "to_s", "&lt;=", "const_set", "allocate", "class", "new", "private_methods", "=~", "tainted?", "__id__", "class_exec", "autoload", "untaint", "nil?", "private_instance_methods", "include?", "is_a?"]
  </code></pre>
  
  <p><strong><em>return value of Mysql.methods(false)</em></strong></p>
  
  <p>is []... blank array</p>
  
  <p><strong>EDIT2</strong></p>
  
  <p><em>mysql.rb file</em></p>
  
  <pre><code> # support multiple ruby version (fat binaries under windows)
   begin
    require 'mysql_api'
    rescue LoadError
     if RUBY_PLATFORM =~ /mingw|mswin/ then
  RUBY_VERSION =~ /(\d+.\d+)/
  require "#{$1}/mysql_api"
   end
   end
  
   # define version string to be used internally for the Gem by Hoe.
    class Mysql
      module GemVersion
       VERSION = '2.8.1'
    end
    end
  </code></pre>