I am trying to figure-out how to properly manage website file assets (pdfs, etc.) which are content on my site without having to have them part of my svn repository. Right now when I deploy a new release using Capistrano the release only contains what was in my repository... I guess I need to have capistrano create a symlink for my public/assets directory but I''m not sure how to go about that and can''t find docu''s anywhere that help. I also prefere to manage my stylesheets and javascript separate from the Rails app in svn so I''d like these elsewhere. Any advice? Can''t seem to find an answer to this anywhere. Thanks, Loren -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Loren Johnson wrote:> I am trying to figure-out how to properly manage website file assets > (pdfs, etc.) which are content on my site without having to have them > part of my svn repository. > > Right now when I deploy a new release using Capistrano the release only > contains what was in my repository... > > I guess I need to have capistrano create a symlink for my public/assets > directory but I''m not sure how to go about that and can''t find docu''s > anywhere that help.I use something like this in deploy.rb to link in my config files: desc "Link in production database config and spin script" task :after_update_code do run <<-CMD ln -nfs #{deploy_to}/#{shared_dir}/config/database.yml #{release_path}/config/database.yml CMD run <<-CMD ln -nfs #{deploy_to}/#{shared_dir}/script/spin #{release_path}/script/spin CMD end Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Another (simpler) way to ensure that your files are not wiped out with every update is to stored them in /public/system. This is a shared folder and isn''t wiped out with updates. Hammed On 10/20/06, Chris Mear <chris-OIzkuoyqg0kAvxtiuMwx3w@public.gmane.org> wrote:> > > Loren Johnson wrote: > > I am trying to figure-out how to properly manage website file assets > > (pdfs, etc.) which are content on my site without having to have them > > part of my svn repository. > > > > Right now when I deploy a new release using Capistrano the release only > > contains what was in my repository... > > > > I guess I need to have capistrano create a symlink for my public/assets > > directory but I''m not sure how to go about that and can''t find docu''s > > anywhere that help. > > I use something like this in deploy.rb to link in my config files: > > desc "Link in production database config and spin script" > task :after_update_code do > run <<-CMD > ln -nfs #{deploy_to}/#{shared_dir}/config/database.yml > #{release_path}/config/database.yml > CMD > > run <<-CMD > ln -nfs #{deploy_to}/#{shared_dir}/script/spin > #{release_path}/script/spin > CMD > end > > Chris > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hammed Malik wrote:> Another (simpler) way to ensure that your files are not wiped out with > every > update is to stored them in /public/system. This is a shared folder and > isn''t wiped out with updates. > > HammedHammed, that sounds just right. I''d noticed that system symlink but I was shy thinking it was being used for something else. In the mean time this is what I came-up with for a solution. Lines I added to my deploy.rb # ============================================================================# TASKS # ============================================================================desc "Restarting after deployment" task :after_deploy, :roles => [:app, :db, :web] do # run "mkdir /var/www/apps/shared_assets" run "ln -s #{deploy_to}/../shared_assets #{deploy_to}/current/public/assets" end Relevant links: http://rubynoob.com/articles/2006/09/21/how-to-deploy-your-first-rails-app-to-dreamhost-using-capistrano-in-windows http://atmos.org/2006/8/29/acts_as_attachment-walkthrough Thanks, Loren -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---