简体   繁体   中英

Would there be compatibility issues upgrading rails 2 to rails 3?

Im considering upgrading a rails 2 app to rails 3 for a number of reasons (rails 3 features, certain plugins require rails 3 etc.)

Obviously ill have to update/grade some of the plugins as well. But concerning the code itself, should there be any compatibility issues when upgrading to 3? I know rails 3 changes a lot of helpers and syntax to make things easier, but do the older and more complicated ways still work (ex. gems in envioronment.rb, not Gemfile).

Also, anyone know a good tutorial on how to do it?

I have written a blogpost about it, where I point to the standard resources, but also handle some more deeper problems I encountered.

Hope this helps.

You may try this plugin to check your application compatibility in Rails 3. https://github.com/rails/rails_upgrade

If you want to upgrade from Rails 2 to Rails 3, first make sure to upgrade to the latest 2.3 version.

Then, before migrating, there is a list of changes you can make to make your Rails 2.3 application behaving like a Rails 3 application. Once you applied these changes, chances are the number of issues will be smaller and you can upgrade to Rails 3.

Once you installed Rails 3, use the rails_upgrade plugin to check the incompatibilities and fix them.

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