Forum: Ruby on Rails NoMethodError: undefined method `net'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
88d46135d21ed3b5f4c6d6bce59220ce?d=identicon&s=25 Mark (Guest)
on 2007-06-28 12:42
Hi,

I am just creating a unit test and I am being shown the following error,
has anyon any suggestions to how I can fix this?


1) Error: test_size_of_attributes(BlogTest):
NoMethodError: undefined method `net' for Blog:Class
    C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_r
ecord/base.rb:1235:in `method_missing'

Thanks
Fb1a6916e06f221b5b53a6665f9858eb?d=identicon&s=25 Mikel (Guest)
on 2007-06-28 13:37
(Received via mailing list)
Dear Mark,

Can you post the test that is failing?  Or all the tests if there are
not many?

Regards

Mikel
88d46135d21ed3b5f4c6d6bce59220ce?d=identicon&s=25 Mark (Guest)
on 2007-06-28 14:23
Mikel wrote:
> Dear Mark,
>
> Can you post the test that is failing?  Or all the tests if there are
> not many?
>
> Regards
>
> Mikel

Hi Mikel,

#
  # check word filter works
#  def test_word_filter
#    blog = Blog.net(:title        => "test_title",
#                    :raw_content  => "test raw content. fuck")
#
#    assert !blog.valid?
#  end
727d5785259d057745de13a9f3a713f4?d=identicon&s=25 David Rose (Guest)
on 2007-06-28 23:59
(Received via mailing list)
Are you sure you don't mean "blog = Blog.new(..." ?

doppler
88d46135d21ed3b5f4c6d6bce59220ce?d=identicon&s=25 Mark (Guest)
on 2007-06-29 13:34
David Rose wrote:
> Are you sure you don't mean "blog = Blog.new(..." ?
>
> doppler

that would be the problem! doh!

cheers
This topic is locked and can not be replied to.