views:

78

answers:

1

Not sure if I've done everything right here. I added the Paperclip gem to my Gemfile and did bundle install. I followed along with the readme instructions on Paperclips Github page.

I wasn't sure if I needed to install ImageMagick. But, I found a script on Github for installation on Snow Leopard, so I ran:

rails plugin install http://github.com/masterkain/ImageMagick-sl.git

But, now I'm getting Undefined method has_attached_file

I'm completely new to Rails and programming. Most of this is pretty advanced for me, but so far I've managed to figure stuff out.

A: 

Have you restarted your rails server?

Beerlington
Geez. Thank you. Restarting the server solved the problem with has_attached_file. Now I'm getting No route matches {:action=>"destroy", :controller=>"products"}
teecraft
Here's my model:<br />class Product < ActiveRecord::Base has_many :colors has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :path => ":class/:attachment/:id/:style/:basename.:extension", :default_url => "/images/missing/:class/:attachment/:style.jpg"end<br />This is how I structured the form:<br /><%= form_for @product, :url => product_path, :html => { :multipart => true } do |f| %>
teecraft
Have you setup your routes file with the products resources? Do you have a destroy method in your products controller?
Beerlington