Capistarno deploy each time ckeditor assets removed

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
  on :start,  "uploads:register_dirs"

end

I 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.

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

Thank you very much Frederick C. 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

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)
end

It is creating a ckeditor_assets folder but it is not opening. May be
permission issue.

On Friday, November 29, 2013 10:47:29 AM UTC, debadatta wrote:

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 to

task :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