>>>>> "treydock" == treydock  <[email protected]> writes:
    treydock> I'm attempting use of Capistrano for the first time, and
    treydock> have followed the steps on the wiki to "Manage
    treydock> database.yml securely".

I'm not really sure what you are trying to do.

This is what I do.  Put database.yml and production.rb (because I have
some settings that differ depending on which machine, alpha test or
release) into ~ on the target machine(s).  
(I often put those files there by debian package and/or post-install
script), and I do:

namespace :deploy do
  task :update_database_yml, :roles => [:app,:web] do
    db_config = "/home/#{user}/database.yml"
    prod_config = "/home/#{user}/production.rb"
    run "cp #{db_config}   #{release_path}/config/database.yml"
    run "cp #{prod_config} #{release_path}/config/environments"
    releasenum=File.basename(release_path)
    run "echo '$ReleaseNum = \"#{releasenum}\"' 
>#{release_path}/config/initializers/releasenum.rb"
    puts "Ran update database_yml"
  end
  after "deploy:update_code", "deploy:update_database_yml"
end

(Releasenum.rb is included in my layout as a comment, so I can know that
in fact I did deploy properly...)

-- 
]       He who is tired of Weird Al is tired of life!           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] [email protected] http://www.sandelman.ottawa.on.ca/ |device driver[
   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
                       then sign the petition. 

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to