Occassional NoMethodError after creating new model object

This seems to happen every so often, where I have code similar to the
following:

new_model_obj = Foo.new
new_model_obj.someParam = someVar

And I get the following error:

undefined method `someParam=’ for #

This code normally runs fine with no problems, the Foo object clearly
has that attribute and this code works 95% of the time. The strange
thing I noticed is that in the error msg, # does not have a hex
address location like it normally would. If I intentionally try to
create this error by calling new_model_obj.blah where I know blah is
not an attribute, I get an error msg that looks like this:

undefined method `blah’ for #Foo:0x476321c

Anybody have any ideas why this would occasionally happen? Any help
would be greatly appreciated as I am thoroughly stumped.

Thanks