Ruby on Rails
Sunday, January 13, 2019
I do not have an app on the machine yet. I just installed rails 4.1 and I wanted to do an incremental upgrade prior to placing the preexisting app on the machine.
Then, assuming your tests pass, you can create a new git branch, edit the Gemfile to point to a newer version of Rails, and run `bundle update rails`. That will give you the new Rails and any dependencies that were changed by the update.
You then have a coin-flip chance that the app will pass its tests, depending on how large a change you made.
For a start on fixing the differences, you can then run `rake rails:upgrade` or `rails app:upgrade`, depending on which version of Rails you've moved to, and that will perform all sorts of automated fixes. It will probably also break some things, too.
It's really worthwhile to read the Rails Guide on upgrading. It covers best practices and has lots of helpful hints to debug the changes.
Walter
--On Sunday, January 13, 2019 at 6:24:22 PM UTC-5, Hassan Schroeder wrote:On Sun, Jan 13, 2019 at 1:42 PM <braini...@gmail.com> wrote:
> Can you assist me with the syntax to incrementally upgrade rails 4.1 to 4.2?
I'm not sure what "syntax" is in this context, but upgrading is just a
matter of editing your project Gemfile and running `bundle update`.
And of course fixing deprecation warnings and errors and whatnot 😀
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4e235088-cb19-4d2e-a154-05bbc7e6bdb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment