In this article, I’ll try put best things thet I found, when I was upgrading one of my Rails app from Ruby on Rails 3.2 to Ruby on Rails 4.0.2.
- Upgrade your Ruby version at least to 2.0(I would recommend 2.1)
- Upgrade bundler
- Upgrade your application to the most recent Rails 3.2 version
- Check gems compatibility ready4rails4.net
- Write more tests, they’ll be very usefull
I recommend to use bunch of usefull gems to upgrage your app step by step:
gem protected_attributes
gem active_resource
gem actionpack-action_caching
gem activerecord-session_store
gem rails-observers
So first – watch the video: (http://railscasts.com/episodes/415-upgrading-to-rails-4)
Then modify your Gemfile, if you have an assets group, it needs to be removed…
Don’t forget:
– to update any gems that require something special
– filter_parameters
– secret_key_base (you can use rake task: ‘rake secret’)
– strong parameters
– …
Some links that may help you:
Edgeguides upgrading-from-rails-3-2-to-rails-4-0
Upgrading to Rails 4.0 from Rails 3.2 – Test case – Part I (preparations, configuration, gems)
http://upgradingtorails4.com/
Hstore:
postgresql-rails-4-countdown
using-arrays-of-hstore-with-rails-4
If you’ll have a problem with devise strong(unpermited)parameters:
http://stackoverflow.com/questions/18629221/unpermitted-parameters-devise-oauth-rails-4
https://github.com/plataformatec/devise
https://coderwall.com/p/bsfitw