Hi I'm updating my capistrano recipes to work with 2.0. (By the way,
I'm really liking the Capfile configuration technique.)

One place I'm stuck is where I write my database.yml file:

Previously, I had something like:

def write_database_yaml #, :roles => :app do
  # generate database configuration
  database_configuration = render :template => <<-EOF
<..snip..>
  EOF
  put database_configuration, "#{aws('current_release')}/config/
database.yml", :mode => 0664
  sudo "chown -R #{aws('user')}:#{aws('group')}
#{aws('current_release')}/config/database.yml"
end

that worked fine.

With "render" no longer working, I'm trying ERB things like:

def write_database_yaml #, :roles => :app do
  # generate database configuration
  template = %q{
    defaults: &defaults
    <..snip ..>
  }
  database_configuration = ERB.new(template).result(binding)
  put database_configuration, "#{aws('current_release')}/config/
database.yml", :mode => 0664
  sudo "chown -R #{aws('user')}:#{aws('group')}
#{aws('current_release')}/config/database.yml"
end

Any suggestions on how to make this work? The above gives me a: "
uploading failed: No such file"

thanks,

Steve Odom


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to