On Nov 21, 2007, at 12:20 AM, Leon Bogaert wrote:

>
> Chris Taggart wrote:
>> Leon Bogaert wrote:
>>> Thanks in advance!
>>>
>> The usual way of solving this (for images generated by the app,  
>> rather
>> than ones for the layout, which may be in the svn repository) is to  
>> put
>> the images in the shared folder with a symlink to them, and then add
>> have capistrano add the symlink after updating the code. I also do  
>> the
>> same for fragment cach files.
>>
>> Something like:
>>  run <<-EOF
>>    cd #{release_path} &&
>>    ln -s #{shared_path}/photos #{release_path}/public/photos
>>  EOF
>>
>> Hope this helps,
>> Chris
>>
>> --
>> ----------------------------
>> Autopendium :: Stuff about old cars
>> http://autopendium.com
> Ah thanks, gonna try that. I now have something like:
>
> namespace :deploy do
>  task :copy_user_images do
>    run "cp #{previous_release}/public/images/users/*.jpg
> current/public/images/users/"
>  end
>
>  task :after_deploy do
>    copy_user_images
>  end
> end

I'd really discourage you to continue doing that. This slows down your  
deployment process as your image directory gets larger.

You do have a shared directory somewhere right? For logs, database.yml  
and the like? This is where you should store images as well and then  
you just symlink it,  which is instantaneous and doesn't unnecessarily  
duplicate images on your filesystem.

Hope that helps...

Cheers,
Robby

--
Robby Russell
Founder and Executive Director

PLANET ARGON, LLC
Design, Development, and Hosting with Ruby on Rails

http://www.planetargon.com/
http://www.robbyonrails.com/

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" 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/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to