Hi all, I have Rails 4.0.0 app, After capistrano deploy my ckeditor_assets are being removed. Could not symlink to shared/ckeditor_assets folder. I have followed this step : namespace :uploads do> > desc <<-EOD > Creates the upload folders unless they exist > and sets the proper upload permissions. > EOD > task :setup, :except => { :no_release => true } do > dirs = uploads_dirs.map { |d| File.join(shared_path, d) } > run "#{try_sudo} mkdir -p #{dirs.join('' '')} && #{try_sudo} chmod > g+w #{dirs.join('' '')}" > end > > desc <<-EOD > [internal] Creates the symlink to uploads shared folder > for the most recently deployed version. > EOD > task :symlink, :except => { :no_release => true } do > run "rm -rf #{release_path}/public/ckeditor_assets" > run "ln -nfs #{shared_path}/ckeditor_assets > #{release_path}/public/ckeditor_assets" > end > > desc <<-EOD > [internal] Computes uploads directory paths > and registers them in Capistrano environment. > EOD > task :register_dirs do > set :uploads_dirs, %w(public/ckeditor_assets) > set :shared_children, fetch(:shared_children) + > fetch(:uploads_dirs) > end > > after "deploy:finalize_update", "uploads:symlink" > on :start, "uploads:register_dirs" > > endI could not figure this out why my public/ckeditor_assets folder is not copied to shared/ckeditor_assets and doesnt symlink also. Please help me. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/98351c53-2abb-4d47-bda9-1f65cadb503a%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Frederick Cheung
2013-Nov-29 10:36 UTC
Re: Capistarno deploy each time ckeditor assets removed.
On Friday, November 29, 2013 10:02:33 AM UTC, debadatta wrote:> > > I could not figure this out why my public/ckeditor_assets folder is not > copied to shared/ckeditor_assets and doesnt symlink also. > > Just so you we are clear, you do realise that these cap tasks *delete*public/ckeditor_assets ? They then symlink to shared/ckeditor_assets, but obviously that needs to be created by you.The setup task does look like it is half trying to do that but you don''t seem to be invoking it, furthermore it would seem to be creating shared/public/ckeditor_assets rather than shared/ckeditor_assets Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ec6f5be4-8b22-4cdf-86c3-1eb4957d6861%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Thank you very much Frederick Cheung for reply. task :register_dirs do> set :uploads_dirs, %w(public/ckeditor_assets) > set :shared_children, fetch(:shared_children) + fetch(:uploads_dirs) > endprobably you are saying about this to create a directory for shared/ckeditor_assets where as this is creating a folder shared/public/ckeditor_assets. I have cheked the folders there are no folders such like that after deplyment. Also for deleting public/ckeditor_assets.. yes i think it gets deleted and after the deployment I can not able to fetch this directory also. Shall I need to change anything except this in my deploy.rb. Any help appreciated. Thanks On Friday, 29 November 2013 16:06:52 UTC+5:30, Frederick Cheung wrote:> > > > On Friday, November 29, 2013 10:02:33 AM UTC, debadatta wrote: >> >> >> I could not figure this out why my public/ckeditor_assets folder is not >> copied to shared/ckeditor_assets and doesnt symlink also. >> >> Just so you we are clear, you do realise that these cap tasks *delete* > public/ckeditor_assets ? They then symlink to shared/ckeditor_assets, but > obviously that needs to be created by you.The setup task does look like it > is half trying to do that but you don''t seem to be invoking it, furthermore > it would seem to be creating shared/public/ckeditor_assets rather than > shared/ckeditor_assets > > Fred >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/63d855b5-d5f8-478f-be5c-e426df31e993%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Now I just changed this to> task :register_dirs do > set :uploads_dirs, %w(/../../shared/ckeditor_assets) > set :shared_children, fetch(:shared_children) + fetch(:uploads_dirs) > endIt is creating a ckeditor_assets folder but it is not opening. May be permission issue. On Friday, 29 November 2013 16:17:29 UTC+5:30, debadatta wrote:> > Thank you very much Frederick Cheung for reply. > > task :register_dirs do >> set :uploads_dirs, %w(public/ckeditor_assets) >> set :shared_children, fetch(:shared_children) + fetch(:uploads_dirs) >> end > > > probably you are saying about this to create a directory for > shared/ckeditor_assets where as this is creating a folder > shared/public/ckeditor_assets. I have cheked the folders there are no > folders such like that after deplyment. > > Also for deleting public/ckeditor_assets.. yes i think it gets deleted and > after the deployment I can not able to fetch this directory also. > Shall I need to change anything except this in my deploy.rb. > > Any help appreciated. > Thanks > > On Friday, 29 November 2013 16:06:52 UTC+5:30, Frederick Cheung wrote: >> >> >> >> On Friday, November 29, 2013 10:02:33 AM UTC, debadatta wrote: >>> >>> >>> I could not figure this out why my public/ckeditor_assets folder is not >>> copied to shared/ckeditor_assets and doesnt symlink also. >>> >>> Just so you we are clear, you do realise that these cap tasks *delete* >> public/ckeditor_assets ? They then symlink to shared/ckeditor_assets, but >> obviously that needs to be created by you.The setup task does look like it >> is half trying to do that but you don''t seem to be invoking it, furthermore >> it would seem to be creating shared/public/ckeditor_assets rather than >> shared/ckeditor_assets >> >> Fred >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8ca4aa6c-e9db-45a6-8a93-cc9292e760d7%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Frederick Cheung
2013-Nov-29 16:44 UTC
Re: Capistarno deploy each time ckeditor assets removed.
On Friday, November 29, 2013 10:47:29 AM UTC, debadatta wrote:> > Thank you very much Frederick Cheung for reply. > > task :register_dirs do >> set :uploads_dirs, %w(public/ckeditor_assets) >> set :shared_children, fetch(:shared_children) + fetch(:uploads_dirs) >> end > > > probably you are saying about this to create a directory for > shared/ckeditor_assets where as this is creating a folder > shared/public/ckeditor_assets. I have cheked the folders there are no > folders such like that after deplyment. > > Also for deleting public/ckeditor_assets.. yes i think it gets deleted and > after the deployment I can not able to fetch this directory also. > Shall I need to change anything except this in my deploy.rb. > > I would change the setup task totask :setup, :except => { :no_release => true } do dirs = [File.join(shared_path,''ckeditor_assets'' )] run "#{try_sudo} mkdir -p #{dirs.join('' '')} && #{try_sudo} chmod g+w #{dirs.join('' '')}" end and leave the rest of your deploy.rb the same. Then as long as you run that setup task at least once, current/public/ckeditor_assets should point to shared/ckeditor_assets Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/527ceb46-e2f7-4981-9db8-24d4da361415%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.