Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Upgrading Rails (Isn't So Bad)

Upgrading Rails (Isn't So Bad)

Upgrading Rails gets a bad rap, but it doesn't have to be so daunting if we listen to our tools and remember that we're in control.

Megan Tiu

June 29, 2016
Tweet

More Decks by Megan Tiu

Other Decks in Technology

Transcript

  1. Upgrading Rails
    (Isn’t So Bad)
    Megan Tiu
    Rails Girls Atlanta
    June 29, 2016

    View full-size slide

  2. It’s not so scary

    View full-size slide

  3. 0. Create a new branch

    View full-size slide

  4. $ git checkout -b rails5

    View full-size slide

  5. 1. Start with a clean test suite

    View full-size slide

  6. 1. Start with a clean test suite
    ● No deprecation warnings
    ● All tests passing
    ● As many gems up-to-date as
    possible

    View full-size slide

  7. 2. Bundle update

    View full-size slide

  8. $ bundle update rails

    View full-size slide

  9. 3. Don’t panic!

    View full-size slide

  10. 4. Update the offending gem

    View full-size slide

  11. gem ‘rspec-rails’, ~> ‘3.5.0.beta4’
    # Gemfile

    View full-size slide

  12. $ bundle update rails rspec-rails

    View full-size slide

  13. 5. We’re still not panicking

    View full-size slide

  14. gem ‘exception_notification’,
    github: ‘smartinez87/exception_notification’,
    branch: ‘rails5’
    # Gemfile

    View full-size slide

  15. $ bundle update rails rspec-rails exception_notification

    View full-size slide

  16. Time to commit!

    View full-size slide

  17. 7. Make your tests pass

    View full-size slide

  18. 8. Deprecation warnings, be gone!

    View full-size slide

  19. Use these...

    View full-size slide

  20. To achieve this!

    View full-size slide

  21. 9. Celebrate!

    View full-size slide

  22. You are in control

    View full-size slide

  23. http://megantiu.com/blog/8/upgrading-rails-
    doesnt-have-to-be-painful

    View full-size slide

  24. https://speakerdeck.com/derekprior/keep-
    rails-upgraded

    View full-size slide