Arie Kusuma Atmaja
2/27/2005 11:37:00 AM
Hi y'all,
I'm new here so please be kind to me :-)
I'm using WinXP Pro, One-click installer Window ruby182-14.exe and
mysql-4.1.10-win32.zip
The code I wrote is : mysql.rb
require 'mysql'
m = Mysql.new("localhost", "ariebanaranakai", "iwakkaring", "budiman")
r = m.query("SELECT username, password FROM user");
r.each_hash do |f|
print "#{f['username']} . #{f['password']}"
end
The Error I got is :
/mysql.rb:3: uninitialized constant Mysql (NameError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
'require__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
'require'
from mysql.rb:1
What's the matter with this ? I've searched the archieves but found
nothing :-(
I've also asked rubyist mailing list in my country but they averagely
said they never get the problem like I do :'(
Please help me and thanks a lot.
Arie