Forum: Ruby on Rails Capistrano + symlink to a shared images directory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B0075ab1d9ea44a971f7e322bddac54b?d=identicon&s=25 cs ss (damnpenguins)
on 2006-05-14 15:01
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!
992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 Jamis Buck (Guest)
on 2006-05-14 16:01
(Received via mailing list)
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

- Jamis
B0075ab1d9ea44a971f7e322bddac54b?d=identicon&s=25 cs ss (damnpenguins)
on 2006-05-15 07:39
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
>
> - Jamis

Great! Thanks for that!
This topic is locked and can not be replied to.