Shoulda macros not loading when using Paperclip as a gem

36 views
Skip to first unread message

Kyle Fox

unread,
Nov 18, 2009, 3:58:59 PM11/18/09
to Paperclip Plugin
This message has been posted numerous times, but hasn't (to my
knowledge) ever received a response.

We're using Paperclip as a gem. When I try to use the shoulda macro
`has_attached_file`, I encounter this error: undefined method
`should_have_attached_file'

I realize the macros will work if we run `rake gems:unpack` but I
don't want to vendor my gems.

How can I get Paperclip's shoulda macros loading? I would really,
really, appreciate any kind of response -- and judging by the number
of messages on the subject, other people would as well.

Thanks,
Kyle.

Ken Collins

unread,
Nov 23, 2009, 9:08:48 AM11/23/09
to papercli...@googlegroups.com

New to paperclip and that hit me too. I just copied it over. I assume this point is moot when things are more standardized around the gem bundler. At least that was the impression I got.

- Ken
> --
> Individuals over processes. Interactions over tools.
>
> Agile Rails training from thoughtbot, the makers of Paperclip, Clearance, Shoulda, & Factory Girl:
> http://thoughtbot.com/services/training
>
> The Paperclip group:
> http://groups.google.com/group/paperclip-plugin
>
> To post to this group, send email to
> papercli...@googlegroups.com
>
> To unsubscribe from this group, send email to
> paperclip-plug...@googlegroups.com

Kyle Fox

unread,
Dec 1, 2009, 1:22:52 PM12/1/09
to Paperclip Plugin
How did you just copy it over? I'm still kinda new to this ...

Ken Collins

unread,
Dec 1, 2009, 2:35:40 PM12/1/09
to papercli...@googlegroups.com

In my app I just created a directory "test/should_macros" and copied the "paperclip.rb" file from the gem over. If you don't want to dig around where your gems are stored, you can just download the project from github and do the same.


- Ken

On Dec 1, 2009, at 1:22 PM, Kyle Fox wrote:

> How did you just copy it over? I'm still kinda new to this ...
>
Reply all
Reply to author
Forward
0 new messages