If you are like me, using capistrano, 1. add those lines below to deploy.rb:
task "stage.example.com" do set :target, current_task.name end task "test.example.com" do set :target, current_task.name end task :replace_configs do run "(cd #{release_path}; cp config/deploy/#{target}/database.yml config)" end before "deploy:finalize_update", :replace_configs 2. place database.yml for each target config/deploy/stage.example.com/database.yml and config/deploy/test.example.com/database.yml 3. then, you can deploy each target $ cap stage.example.com deploy or $ cap test.example.com deploy A recipe "Run Multi-Stage Deployments" in the book "Advanced Rails Recipes" describes such one http://pragprog.com/titles/fr_arr/advanced-rails-recipes On Jun 28, 9:20 am, "Anthony Ettinger" <[EMAIL PROTECTED]> wrote: > I currently do push the database.yml file, how should I do it without > having that file on the server? > > > > On Fri, Jun 27, 2008 at 2:17 PM, Robby Russell <[EMAIL PROTECTED]> wrote: > > > Well, assuming that you don't have the database.yml in your SCM (which > > you shouldn't)... you should be able to just set the production db to > > the different database for each one. > > > Robby > > > On Fri, Jun 27, 2008 at 11:11 AM, Anthony Ettinger <[EMAIL PROTECTED]> > > wrote: > > >> How do I avoid adding: > >> export RAILS_ENV='production' > > >> How do I avoid setting my environment globally as production? > > >> I have two sites on the same server: > > >> /www/stage.example.com > >> /www/test.excample.com > > >> Both apps are using the same database after deployment, I'd like them > >> not to be shared. > > >> -- > >> Anthony Ettinger > >> 408-656-2473 > >>http://anthony.ettinger.name > > > -- > > Robby Russell > > Chief Evangelist, Partner > > > PLANET ARGON, LLC > > design // development // hosting > > >http://www.planetargon.com/ > >http://www.robbyonrails.com/ > > aim: planetargon > > > +1 503 445 2457 > > +1 877 55 ARGON [toll free] > > +1 815 642 4068 [fax] > > -- > Anthony Ettinger > 408-656-2473http://anthony.ettinger.name --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---