简体   繁体   中英

Ruby upgrade version and code compatibility checker

Is there a way to upgrade the underlying Ruby version of a rails project and be certain there are no breaking changes within the code? I use rvm to maintain my Ruby environment and I know I can simply create a new environment and go from there but that would involve testing the entire application.

For example, my Gemfile specifies the following:

ruby '2.0.0'
gem 'rails', '~> 4.0.3'
gem 'rake'

If I were to upgrade to Ruby 2.4 is there any way to check my code to see if there are any breaking changes between versions?

Turns out if you are using bundler you can do a bundle update and it will update all the gems to the latest compatible versions. You can then do a bundle clean it will remove unused gems and finally using rvm you can update versions and test functionality.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM