Capistrano + symlink to a shared images directory

Hi everyone,

I have deployed a rails tumblelog site via capistrano, but have run into
a problem. What I am wanting to do is this: In my deployment script
create symlinks from the public directory so that the images directory
points to a shared images directory.

Reason being is I am adding an image upload to the site (not
file_column) and need to easily add the uploaded images and thumbs into
a shared directory. Could someone please help me with the proper
commands to map the public/images directory to the shared/images
directory via the after_symlink task in deploy.rb?

thanks!

On May 14, 2006, at 7:01 AM, Cameron S. wrote:

into
a shared directory. Could someone please help me with the proper
commands to map the public/images directory to the shared/images
directory via the after_symlink task in deploy.rb?

This ought to do it:

task :after_symlink do
run “ln -nfs #{shared_dir}/images #{release_dir}/public/images”
end

  • Jamis

Jamis B. wrote:

On May 14, 2006, at 7:01 AM, Cameron S. wrote:

into
a shared directory. Could someone please help me with the proper
commands to map the public/images directory to the shared/images
directory via the after_symlink task in deploy.rb?

This ought to do it:

task :after_symlink do
run “ln -nfs #{shared_dir}/images #{release_dir}/public/images”
end

  • Jamis

Great! Thanks for that!