I completed this tutorial to install a clip with s3 on the hero. And everything is fine! But now I moved on to a new project, and I tried to reproduce the steps that I took with the first to upload images. But I canβt, and it drives me crazy! Please help me with this problem ... I have lost hours and hours .: - /
This is what happens: I create an action that selects a photo, and I think the download does not even start (too fast!). No error is caused, but the "photo" attribute of my activity is /photos/original/missing.png
Here is my model file:
class Activity < ActiveRecord::Base has_many :infos, :dependent => :destroy has_many :links, :dependent => :destroy has_many :events, :dependent => :destroy accepts_nested_attributes_for :infos has_attached_file :photo, :styles =>{ :thumb => "80x60#", :medium => "160x120#", :large => "320x240#", :home => "320x370#" }, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => ":attachment/activities/:id/:style.:extension", :bucket => 'andrea' end
my gemfile:
source 'http://rubygems.org' gem 'rails', '3.0.5' gem "paperclip", "~> 2.3" gem 'aws-s3'
and my s3.yml (with full keys in place of "..."):
development: bucket: andrea access_key_id: AKIAII... secret_access_key: vM977oy6W2TIbArCG9... test: bucket: andrea access_key_id: AKIAII... secret_access_key: vM977oy6W2TIbArCG9... production: bucket: andrea access_key_id: AKIAII... secret_access_key: vM977oy6W2TIbArCG9...
Here is the Log:
WARNING: Can't mass-assign protected attributes: infos_attributes [1m[36mAREL (0.3ms)[0m [1mINSERT INTO "activities" ("photo", "created_at", "updated_at", "home", "photo_file_name", "photo_content_type", "photo_file_size", "photo_updated_at", "name") VALUES (NULL, '2011-04-20 13:27:57.428869', '2011-04-20 13:27:57.428869', NULL, NULL, NULL, NULL, NULL, NULL)[0m [paperclip] Saving attachments. Redirected to http://localhost:3000/activities/15 Completed 302 Found in 45ms Started GET "/activities/15" for 127.0.0.1 at 2011-04-20 15:27:57 +0200 Processing by ActivitiesController
If you need more information let me know!
Oh, I tried with heroku restart , but nothing has changed.