MySQL connection issue...

H

Harnish Botadra

Hey All,

I am getting the following error in my Ruby Script:

--------------------------
mysql_adapter.rb:322:in `connect': undefined method `[]' for
nil:NilClass (NoMethodError)
--------------------------

Essentially it occurs at a point when the script tries to connect to the
MySQL DB.

Sample code:

---------------
class Test < ActiveRecord::Base
def self.foo
end
end

Test.transaction do # => Point of error
Test.foo # => Another point of error occu...
end
 
P

Phil

-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]] On
Behalf Of Harnish Botadra
Sent: Donnerstag, 18. Oktober 2007 09:19
To: ruby-talk ML
Subject: MySQL connection issue...

Hey All,

I am getting the following error in my Ruby Script:

--------------------------
mysql_adapter.rb:322:in `connect': undefined method `[]' for
nil:NilClass (NoMethodError)
--------------------------

Essentially it occurs at a point when the script tries to connect to
the
MySQL DB.

Is the mysql gem installed?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top