Ratings downgraded from 4.2.1 to Rails 4.0.2
I was wondering if we are the best way to downgrade Rails from 4.2.1
to 4.0.2
. For now my plan is to remove the gemfile.lock and change
gem 'rails', 4.2.1' to gem 'rails', '4.0.2'
But I can see the problems occurring, such as the Railties
way the files are created application.rb
,development.rb
Example
Rails 4.2.1
# Development.rb
Rails.application.configure do
end
Rails 4.0.2
# Development.rb
MyApp::Application.configure do
end
Rails 4.2.1
# Application.rb
require File.expand_path('../boot', __FILE__)
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
Bundler.require(*Rails.groups)
Rails 4.0.2
# Application.rb
require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
Bundler.require(:default, Rails.env)
Is this a big jump or is there a safe way to do it?
EDIT
So, after answering the first question I get when trying to run my application,
`require': cannot load such file -- active_job/railtie (LoadError)
source to share
I would like to suggest using any ruby ββversion manager i.e. RVM
and use rvm
rvm use 2.1.2
and then install a new gemset
rails create gemset rails4.0
and use gemset
rails use 2.1.2@rails4.0
and changes to your Gemfile and remove Gemfile.lock according to your needs and then run fresh bundle
delamination
Hope these are fresh and separate gems and it will work well. Try it.
source to share