Ruby on Rails
Friday, November 29, 2013
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"
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.
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@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment