Hi Keith, I appreciate the help, but you've left me a bit confused. If I read this right, your addition is just going to add a staging section into the database.yml file on the fly during the deploy setup. Seems easier to just add it in for real. Please explain what/why.
thanks much, jp Keith Pitty wrote: > Hi Jeff, > > Within your config/deploy/staging.rb file something like the following > could help: > > require 'erb' > > before "deploy:setup", :db > after "deploy:update_code", "db:symlink" > > namespace :db do > desc "Create database yaml in shared path" > task :default do > db_config = ERB.new <<-EOF > staging: > adapter: mysql > encoding: utf8 > username: #{user} > password: #{password} > database: #{application}_staging > EOF > > run "mkdir -p #{shared_path}/config" > put db_config.result, "#{shared_path}/config/database.yml" > end > > desc "Make symlink for database yaml" > task :symlink do > run "ln -nfs #{shared_path}/config/database.yml #{release_path}/ > config/database.yml" > end > end > > Regards, > Keith -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---