views:

39

answers:

2

I have an app I've been upgrading to Rails 3, I've been hosting it on heroku for the past 6 months (rails 2.3.8 currently) but am unclear how to test my Rails 3 branch before I proceed.

The most i could find about the subject in their docs was that I could do something like this:

$ heroku create --stack bamboo-ree-1.8.7 --remote trybamboo
Created http://young-wind-88.heroku.com/ | [email protected]:young-wind-88.git
Git remote trybamboo added

$ git push trybamboo master

This seems to work and creates a new app from the same git repo but with my new branch, what I'm unsure about is how to push some test data to make sure it works correctly? Ie heroku db:push... I haven't tried it, but all heroku commands still seem tied to the master branch and my production app. How can I push data to my remote app? Any ideas? Or the best way to test out new branches?

http://docs.heroku.com/bamboo

A: 

You can create seed data in db/seeds.rb and run heroku rake db:seed after pushing your application to put this data into your application's database.

Ryan Bigg
Yeah, but my point is that heroku rake ANYTHING would still only effect the default app and not my rails3 branch I want to test.
holden
@holden: Your initial question wasn't clear then. Please clarify it.
Ryan Bigg
+1  A: 

The heroku command accepts an argument --app foo to let you run commands against a specific app other than the default. Sounds like you could db:pull from your main app and then db:push into your production app. If you can figure out the database URL for the source then you could probably do it in one go.

tfe