Welcome Guest | Login

cap deploy and missing thumbnails

Any Attachment_fu thumbnails including folders made since my first deploy a few days ago are somehow removed when I do a cap:deploy.

This happens every time I do a deploy.  For instance if my folders are numbered up to pathToThumbnails/0000/59 on my local machine and I have since uploaded new images via Attachment_fu on my server and the folders are numbered up to pathToThumbnails/0000/125 on the server, when I deploy the folders are now back down to pathToThumbnails/0000/59 on the server and my app can't load any of the images.

Using MiniMagick.

I think it might be gremlins.

2008-02-28 12:01 AM

I am a user.
This is a downfall of Capistrano in my opinion.  Because it checks out your application every time it sounds like its only spitting out what is in your respostiory..(down to 0000/59)

The solution to this is to make sure your pathToThumbnails is symlinked to the shared directory so it doesn't get blown away every time.  You'll need to write that into your capfile - if you need help let us know (paste in your current capfile)

2008-02-28 12:22 PM

Great, thanks for the help.

Here is my Capfile:
__________________________________________________

load 'deploy' if respond_to?(:namespace) # cap2 differentiator
load 'config/deploy'

namespace :deploy do

 task :start, :roles => :app do
   run "rm -rf /home/#{user}/public_html;ln -s #{current_path}/public /home/#{user}/public_html"
   run "cd #{current_path} && mongrel_rails start -e production -p #{mongrel_port} -d"
 end

 task :restart, :roles => :app do
   run "cd #{current_path} && mongrel_rails stop"
   run "cd #{current_path} && mongrel_rails start -e production -p #{mongrel_port} -d"
   run "cd #{current_path} && chmod 755 #{chmod755}"
 end

end

______________________________________________________

2008-02-28 06:41 PM

I am a user.
I found a link that gave me all the info I needed.  All is good now.

Here is the link for reference:

http://almosteffortless.com/2007/03/25/working-with-attachment_fu/

2008-02-28 07:51 PM

I am a user.

Hello Guest! In order to post you must be an active client with us, please log in or sign up.