Cameron Senior
2006-May-14 13:01 UTC
[Rails] 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! -- Posted via http://www.ruby-forum.com/.
Jamis Buck
2006-May-14 14:00 UTC
[Rails] Capistrano + symlink to a shared images directory
On May 14, 2006, at 7:01 AM, Cameron Senior wrote:> 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?This ought to do it: task :after_symlink do run "ln -nfs #{shared_dir}/images #{release_dir}/public/images" end - Jamis
Cameron Senior
2006-May-15 05:39 UTC
[Rails] Re: Capistrano + symlink to a shared images directory
Jamis Buck wrote:> On May 14, 2006, at 7:01 AM, Cameron Senior 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 > > - JamisGreat! Thanks for that! -- Posted via http://www.ruby-forum.com/.