Hi, 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 http://svn.techno-weenie.net/projects/plugins 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 validates_as_attachment end Any ideas? Thanks, Scott --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. Scott On Feb 26, 1:08 pm, "Scott" <tamosu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > 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 sourcehttp://svn.techno-weenie.net/projects/plugins > 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 > validates_as_attachment > end > > Any ideas? > > Thanks, > > Scott--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
had the same problem. restarting the server helped. siegi On 26 Feb., 21:36, "Scott" <tamosu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Fixed it. For some reason, the script/plugin installacts_as_attachmentdidn''t seem to install properly. I ran it again and > it installed correctly the second time. > > Scott > > On Feb 26, 1:08 pm, "Scott" <tamosu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi, > > > I am trying to use the Acts as Attachment plugin and running into the > > following error: > > >undefinedmethod`acts_as_attachment'' for Photo:Class > > > Here''s the steps I took: > > > script/plugin sourcehttp://svn.techno-weenie.net/projects/plugins > > script/plugin installacts_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 > > validates_as_attachment > > end > > > Any ideas? > > > Thanks, > > > Scott- Zitierten Text ausblenden - > > - Zitierten Text anzeigen ---~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---