Hello all! I''m a newbie to Rails and I''m trying to get things
working on
an old RH9 box. I was wondering if someone could help me troubleshoot a
mysql_adapter.rb error?
I set everything up and created a simple test app and then generated a
scaffold for it. When I try to go to the main controller and list the
data, I get the following error:
ArgumentError...
NULL pointer given
The stack trace starts in my controller where it is trying to return the
values for the "list" action (simply read the records in the DB), but
the actual error appears to be in mysql_adapter.rb:326 as part of the
private "select" method.
I don''t know if the problem is in this adapter or has to do with my
configuration. Is there a way to set debug statements in code that''s
not part of your app? I''d like to see what the "sql" variable
is in the
"select" method of mysql_adapter.rb to try and see what''s
going on.
Lessee... I am using MySQL 4.1 with a user account without a password.
I''m running the latest stable ruby and rails packages (installed
today).
I''ve tried both webrick and lighttpd and neither matters. I also had
this error when I had MySQL 4.0 installed earlier today (I upgraded as
part of my attempts to figure this out). As near as I can tell,
everything else is working. The irony is that the default controller
when the DB table is empty works and shows the form... and lets me
insert. So INSERT commands are working, but then the view to show the
list chokes. Why would INSERT work but not SELECT?? Hrm.
Anyway, I''d love any help with this... even as simple as how to debug
the Ruby code in mysql_adapter.rb to determine what values are getting
passed in/out.
BTW, I don''t know if there is a better place to post these questions.
I''ve been banging my head against this all day. If it would be better
to
contact me directly instead of via the list, please do so. :-)
drsharp@sharpdesigns.com
Thanks!
-Dan
--
Posted via http://www.ruby-forum.com/.