Ruby on Rails Friday, November 29, 2013



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

--
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/527ceb46-e2f7-4981-9db8-24d4da361415%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment