The first thing I notice is that you're using the file system storage,
which won't work on heroku. You'll need to use the amazon S3 service
or some other external storage service (http://heroku.com/docs#toc67)

One thing that attachment_fu won't do for you is create the S3 bucket
if it's not already created. You'll need to create the bucket before
attachment_fu will save to it.

Good luck!

Stu

On Mar 21, 11:53 pm, oivoodoo <[email protected]> wrote:
> Some days ago I try to work with paperclip on the heroku server. But I
> doesn't support. Ok, then I try to install attachment_fu plugin. But
> it doesn't work too.
>
> It's my model for images.
>
> class Photo < ActiveRecord::Base
>   has_attachment :content_type => :image,
>                  :storage      => :file_system,
>                  :processor    => :image_science,
>                  :thumbnails   => {
>                     :medium => "418x463>",
>                     :thumb => "85x85>"
>                  }
>
>   validates_uniqueness_of :filename
>   validates_as_attachment
>
>   belongs_to :page
>
>   attr_accessor :should_destroy
>
>   def should_destroy?
>     should_destroy.to_i == 1
>   end
>
>   def valid?
>     true
>   end
> end
>
> // DB
>
>     add_column :photos, :size,          :integer
>     add_column :photos, :width,         :integer
>     add_column :photos, :height,        :integer
>     add_column :photos, :content_type,  :string
>     add_column :photos, :filename,      :string
>     add_column :photos, :thumbnail,     :string
>     add_column :photos, :parent_id,        :integer
>
> // In Controller
> // ...
> @photo = Photo.new(:uploaded_data => params[:photo])
> @photo.save!
> // ...
>
> Then I run "heroku console".
>
> > photo = Photo.find(:last)
>
> and photo.size -> nil(also heigh, width)
>
> May be I do something wrong?
>
> ------------------------------------------------
> LOGS-----------------------------------------------
> ==> log/server_6346_ff6d80b_e014_55103.log <==
> /disk1/home/slugs/6346_ff6d80b_e014/mnt/app/views/pages/_page.html.erb:
> 5: warning: parenthesize argument(s) for future version
> /disk1/home/slugs/6346_ff6d80b_e014/mnt/app/views/pages/_page.html.erb:
> 5: warning: parenthesize argument(s) for future version
>
> ==> log/production.log <==
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in
> `dispatch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:60:in `serve_rails'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:80:in `call'
>     /home/heroku_rack/lib/static_assets.rb:9:in `call'
>     /home/heroku_rack/lib/last_access.rb:15:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 42:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `each'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/builder.rb:
> 64:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:80:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `catch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:57:in `process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:42:in `receive_data'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run_machine'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/
> base.rb:57:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb:
> 150:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/controllers/
> controller.rb:80:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `send'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `run_command'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 139:in `run!'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6
>     /usr/local/bin/thin:19:in `load'
>     /usr/local/bin/thin:19
>
> Rendering /disk1/home/slugs/6346_ff6d80b_e014/mnt/public/404.html (404
> Not Found)
>
> Processing ApplicationController#index (for 81.30.81.200 at 2009-03-21
> 23:38:15) [GET]
>
> ActionController::RoutingError (No route matches "/main_photos/
> 0000/0003/stbranding_thumb.gif" with {:method=>:get}):
>     /vendor/rails/actionpack/lib/action_controller/routing/
> recognition_optimisation.rb:66:in `recognize_path'
>     /vendor/rails/actionpack/lib/action_controller/routing/
> route_set.rb:386:in `recognize'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 182:in `handle_request'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 110:in `dispatch_unlocked'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 123:in `dispatch'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 122:in `synchronize'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 122:in `dispatch'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 132:in `dispatch_cgi'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in
> `dispatch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:60:in `serve_rails'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:80:in `call'
>     /home/heroku_rack/lib/static_assets.rb:9:in `call'
>     /home/heroku_rack/lib/last_access.rb:15:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 42:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `each'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/builder.rb:
> 64:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:80:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `catch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:57:in `process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:42:in `receive_data'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run_machine'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/
> base.rb:57:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb:
> 150:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/controllers/
> controller.rb:80:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `send'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `run_command'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 139:in `run!'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6
>     /usr/local/bin/thin:19:in `load'
>     /usr/local/bin/thin:19
>
> Rendering /disk1/home/slugs/6346_ff6d80b_e014/mnt/public/404.html (404
> Not Found)
>
> Processing ApplicationController#index (for 81.30.81.200 at 2009-03-21
> 23:38:31) [GET]
>
> ActionController::RoutingError (No route matches "/photos/0000/0012/
> button_thumb.png" with {:method=>:get}):
>     /vendor/rails/actionpack/lib/action_controller/routing/
> recognition_optimisation.rb:66:in `recognize_path'
>     /vendor/rails/actionpack/lib/action_controller/routing/
> route_set.rb:386:in `recognize'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 182:in `handle_request'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 110:in `dispatch_unlocked'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 123:in `dispatch'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 122:in `synchronize'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 122:in `dispatch'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 132:in `dispatch_cgi'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in
> `dispatch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:60:in `serve_rails'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:80:in `call'
>     /home/heroku_rack/lib/static_assets.rb:9:in `call'
>     /home/heroku_rack/lib/last_access.rb:15:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 42:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `each'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/builder.rb:
> 64:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:80:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `catch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:57:in `process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:42:in `receive_data'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run_machine'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/
> base.rb:57:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb:
> 150:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/controllers/
> controller.rb:80:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `send'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `run_command'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 139:in `run!'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6
>     /usr/local/bin/thin:19:in `load'
>     /usr/local/bin/thin:19
>
> Rendering /disk1/home/slugs/6346_ff6d80b_e014/mnt/public/404.html (404
> Not Found)
>
> Processing ApplicationController#index (for 81.30.81.200 at 2009-03-21
> 23:38:33) [GET]
>
> ActionController::RoutingError (No route matches "/photos/0000/0012/
> button.png" with {:method=>:get}):
>     /vendor/rails/actionpack/lib/action_controller/routing/
> recognition_optimisation.rb:66:in `recognize_path'
>     /vendor/rails/actionpack/lib/action_controller/routing/
> route_set.rb:386:in `recognize'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 182:in `handle_request'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 110:in `dispatch_unlocked'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 123:in `dispatch'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 122:in `synchronize'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 122:in `dispatch'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
> 132:in `dispatch_cgi'
>     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in
> `dispatch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:60:in `serve_rails'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/rack/adapter/
> rails.rb:80:in `call'
>     /home/heroku_rack/lib/static_assets.rb:9:in `call'
>     /home/heroku_rack/lib/last_access.rb:15:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 42:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `each'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/urlmap.rb:
> 35:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/builder.rb:
> 64:in `call'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:80:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `catch'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:78:in `pre_process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:57:in `process'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/
> connection.rb:42:in `receive_data'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run_machine'
>     /usr/local/lib/ruby/gems/1.8/gems/eventmachine-0.12.4/lib/
> eventmachine.rb:237:in `run'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/backends/
> base.rb:57:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/server.rb:
> 150:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/controllers/
> controller.rb:80:in `start'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `send'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 173:in `run_command'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/lib/thin/runner.rb:
> 139:in `run!'
>     /usr/local/lib/ruby/gems/1.8/gems/thin-1.0.1/bin/thin:6
>     /usr/local/bin/thin:19:in `load'
>     /usr/local/bin/thin:19
>
> Rendering /disk1/home/slugs/6346_ff6d80b_e014/mnt/public/404.html (404
> Not Found)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to