Ok, I see. You are working with amazon webservices. But it's only for money.
And I want to save some pictures that's for customization(themes pictures). Can I save images via attachment_fu to database on heroku? On 22 мар, 19:57, Jay Godse <[email protected]> wrote: > I had a problem with Paperclip/S3 and Morten put up a fix. Here is his > comment: > > There's a sample app here:http://paperclip-demo.heroku.comthat shows > it working, and a github repo here for you to grab the code and see > how it's done:http://github.com/pedro/paperclip-on-heroku/tree/master.> > > Cheers, jay > > On Mar 22, 2:53 am, 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' > > > > ... > > продолжение >> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
