heroku deployment testing
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:
- Deploy rails application after git push
- Proper method for committing schema.rb
- What is the best way to resolve Rails orphaned migrations?
- builder install --without rmagick failed in openproject
- Rails app folder is large due to GIT pack file
- rails 4 bundle install with nested form master branch
$ heroku create --stack bamboo-ree-1.8.7 --remote trybamboo Created http://young-wind-88.heroku.com/ | email@example.com: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?
2 Solutions collect form web for “heroku deployment testing”
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.
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.