# Paperclip

**URL:** <https://www.ruby-forum.com/t/paperclip/184128>\
**Category:** Rails\
**Created:** [February 25, 2010, 3:47pm UTC](https://www.ruby-forum.com/t/paperclip/184128 "2010-02-25T15:47:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [February 25, 2010, 3:47pm UTC](https://www.ruby-forum.com/t/paperclip/184128/1 "2010-02-25T15:47:29Z")

</div>

Hi being relatively new to rails I am trying to start a simple project  
on using paperclip to upload an image file and create a thumbnail.

However I am not sure how to use the rails plug-in? What I did was  
install paperclip using gem but not sure if this is the right way to go  
about it.

require ‘paperclip’ seems to fail.

I also tried

script/plugin install git://github.com/thoughtbot/paperclip.git

I don’t see the plugin downloaded when I look in ‘vendos/plugin’ folder?  
I get an error when I run the sample code using the following as an  
example:

[http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/](http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/)

NoMethodError in UsersController#new  
undefined method `has_attached_file' for #<Class:0x7f645b46a700> RAILS_ROOT: /home/yadav/tmp/rails/PaperclipDemo Application Trace | Framework Trace | Full Trace /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1959:in `method\_missing’  
/home/yadav/tmp/rails/PaperclipDemo/app/models/user.rb:3  
/home/yadav/tmp/rails/PaperclipDemo/app/controllers/users\_controller.rb:6:in  
`new’

–  
Kind Regards,  
Rajinder Y.

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [February 25, 2010, 3:52pm UTC](https://www.ruby-forum.com/t/paperclip/184128/2 "2010-02-25T15:52:10Z")

</div>

doing this:

rails testapp  
cd testapp  
script/plugin install git://github.com/thoughtbot/paperclip.git

[http://github.com/thoughtbot/paperclip.git](http://github.com/thoughtbot/paperclip.git)you don’t see paperclip in  
vendor/plugins?

if you do a script/plugin install git://  
[GitHub - activemerchant/active\_merchant: Active Merchant is a simple payment abstraction library extracted from Shopify. The aim of the project is to feel natural to Ruby users and to abstract as many parts as possible away from the user to offer a consistent interface across all supported gateways.](http://github.com/Shopify/active_merchant.git) do you see active\_merchant in  
vendor/plugins?

do you have git installed? if it’s installing these plugins without  
errors  
and you’re not seeing them in vendor/plugins that seems very strange

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [February 25, 2010, 4:03pm UTC](https://www.ruby-forum.com/t/paperclip/184128/3 "2010-02-25T16:03:17Z")

</div>

On Thu, 2010-02-25 at 09:45 -0500, Rajinder Y. wrote:

> script/plugin install git://github.com/thoughtbot/paperclip.git
> 
> I don’t see the plugin downloaded when I look in ‘vendos/plugin’ folder?  
> I get an error when I run the sample code using the following as an example:

* * *

use either gem or plugin, not both

if you use the gem, add to config/environment.rb

config.gem “paperclip”

not needed for plugin. You need to remove either the plugin or the gem.

Craig

–  
This message has been scanned for viruses and  
dangerous content by MailScanner, and is  
believed to be clean.

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [February 25, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/paperclip/184128/4 "2010-02-25T16:56:34Z")

</div>

Craig W. wrote:

> > I also tried  
> > config.gem “paperclip”  
> > Great thanks, got it working!

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [February 25, 2010, 4:58pm UTC](https://www.ruby-forum.com/t/paperclip/184128/5 "2010-02-25T16:58:54Z")

</div>

ben wiseley wrote:

> if you do a script/plugin  
> install git://github.com/Shopify/active\_merchant.git  
> [http://github.com/Shopify/active\_merchant.git](http://github.com/Shopify/active_merchant.git) do you see  
> active\_merchant in vendor/plugins?
> 
> do you have git installed? if it’s installing these plugins without  
> errors and you’re not seeing them in vendor/plugins that seems very strange

Ben thanks for you reply, I realized I didn’t have git install, thought  
I did. I got it working the way Craig said.
