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/
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.
doing this:
rails testapp
cd testapp
script/plugin install git://github.com/thoughtbot/paperclip.git
http://github.com/thoughtbot/paperclip.gityou 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. 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
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.
ben wiseley wrote:
if you do a script/plugin
install git://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.