Forum: Ruby on Rails undefined method `acts_as_attachment' for Photo:Class

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
125639ddcc0b9119bb84e29416ace63a?d=identicon&s=25 Scott (Guest)
on 2007-02-26 19:08
(Received via mailing list)

I am trying to use the Acts as Attachment plugin and running into the
following error:

undefined method `acts_as_attachment' for Photo:Class

Here's the steps I took:

  script/plugin source
  script/plugin install acts_as_attachment
  script/generate attachment_model photo
  rake rails:freeze:gems

Here's my photo.rb file:

class Photo < ActiveRecord::Base
  belongs_to :product
  acts_as_attachment :storage => :file_system, :max_size =>
300.kilobytes, :content_type => :image

Any ideas?


125639ddcc0b9119bb84e29416ace63a?d=identicon&s=25 Scott (Guest)
on 2007-02-26 20:38
(Received via mailing list)
Fixed it. For some reason, the script/plugin install
acts_as_attachment didn't seem to install properly. I ran it again and
it installed correctly the second time.

77de07899eecea8c0fa6c6de19d535e5?d=identicon&s=25 siegi (Guest)
on 2007-03-29 09:56
(Received via mailing list)
had the same problem. restarting the server helped.

This topic is locked and can not be replied to.