Steps to upgrade the rails from 2 to 4 (Initial Level Settings)
- Use latest ruby version first which is compatible with rails 4
- Upgrade your Gems
- Change versions for Gems into Gemfile .
- Find alternative for gems which have been deprecated.
- Comment some below gems if you have into you Gemfile
- gem "mongrel"
- gem "cgi_multipart_eof_fix"
- gem "fastercsv", '1.5.0'
- gem “debugger"
- Remove versions for these two basic Gems
- gem 'mysql2'
- gem 'rake'
- Comment all the mime initializers in file config/initializers/mime_types.rb
- Add config.egger_load in all rails environments in files config/environments/*
- config.eager_load = true
- Change match keyword from file routes.rb to get
You will able to run rails server from console