Ask A Question

Notifications

You’re not receiving notifications from this thread.

Is there an episode on Post Production Updates?

Omar Khedr asked in General

Love the latest episodes Chris! Was wondering if you have or plan to cover soon how to do post production updates on a rails app. For me that is a scary topic and one i think lots of folks would love to do. I can adjust my app in development but once i push to production, I'm stuck on how to do updates to it - like adding new models, controllers, or view pages

Reply
  1. Make sure to work from different branches in git (e.g. master branch is on your production server and develop is on your staging and local)
  2. Do not make changes to your to exisiting migrations, if you need to change/create models create a migration for it.
  3. In case you add a field to a modal and you are using it in a control flow make sure to set a default value
  4. New Controllers/Views can be added like normal
  5. After local testing deploy to your staging server * git pull * rails db:migrate * start your server
  6. If all is verified do the same on production from your master branch, restart your services
Reply

Yeah, that's what I thought, too. Thanks for answering!
https://happywheels2.io

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.