your-app-namewith a name of your choice; only need to do once per workspace):
Gemfile, look for a line that says:
:group => :developmentafter it:
:productiongroup, like this:
Gemfile, make sure the
rails_12factorgem is included in the production group:
bundle installcommit the changes to
your-app-namewith a name of your choice.
master(perhaps because you were experimenting, or working on a feature branch), then you need to instead merge your changes into
masteror, more simply,
masterbranch on production with your current branch (whatever it is called). Be careful!
git pushour code to, and named it
production. That second remote location is on one of Heroku's servers, rather than one of GitHub's.
rails serverafter cloning the project —
bundle install, etc:
https://[YOUR APP NAME]-production.herokuapp.com/:
/git; when you are ready to deploy your changes, from the Terminal,
PG::UndefinedTable... 🤔 The issue is that, just like when we clone a new codebase to our own machine, we have to
rails db:migrateto create the database! Right now, on Heroku, none of our migrations have been run.
heroku run rails db:migrate, if you see the error message "Index name 'index_active_admin_comments_on_author_type_and_author_id' on table 'active_admin_comments' already exists":**
db/migratethat ends with
..._create_active_admin_comments.rband comment out lines 11-13:
rails consoleon your server in California, you can do so with:
https://[YOUR APP NAME]-production.herokuapp.com, and the other at
https://[YOUR APP NAME]-staging.herokuapp.com. But they don't each have to have the same version of the code at the same time.
git pushnew commits to
staging masterfirst, and only once it has passed code review, QA, and been accepted by the Product Owner do you
git push production master.
masterworkflow is already quite robust, but we can now leverage our GitHub collaboration workflow to adopt an even better one: Review Apps.
-staging) and then locate our
originremote in the Connect to GitHub section. (Pay attention to the helper text regarding "Missing a GitHub organization?".)
app.jsonto your repository:
bin/rails dummy:resetto the post-deploy section if I have such a script in my app.
git pull origin master(or click the button at
/git) to get the changes that Heroku made to our GitHub repo on our behalf: