Tuesday, August 06, 2013

Upgrading tips for Ruby 2.0 & Rails 4 from Ruby 1.9.3 & Rails 3

Ruby  2.0
1. mostly compatible with Ruby 1.9.3 version
3. more refinements and code related features;
4. Asynchronous exception handling API
5. More built in libraries
6. Debugging support(DTrace,TracePoint)
7. Performace enhancements like GC optimization and better method dispatch
8. Customize VM ENV variables

Rails 4.0
0.Test coverage is should be good before starting an upgrade.
1. By default thread safe: so have to use gems which are thread safe
2. better utf-8 support
3. better with unicorn like servers
4. Rails 4 prefers Ruby 2.0 and requires 1.9.3 or newer.
5. Some ActionController classes moved to ActionDispatch
6.secret_key_base upgraded carefully , cookies signed based on the new secret_key_base in Rails 4.x are not backwards compatible with Rails( Wait for all users to accommodate new token )
7. Better caching (https://gist.github.com/szimek/1669330)
8.Official upgrade link
    http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html
9. buy a book to upgrade rails 4 ?  here is the link : https://leanpub.com/upgradetorails4