This document describes how to swap out the official Rails 4.2 gems with Rails 4.2 LTS Show archive.org snapshot . If you have installed Rails LTS before and want to update to a newer version, please see our update instructions.
Subscribe to a Rails LTS plan Show archive.org snapshot to receive your credentials. If you already have a paid subscription for another version of Rails LTS, you can use the same credentials for Rails 4.2 LTS at no additional cost.
Make sure your project satisfies the system requirement for Rails LTS. This involves upgrading to the latest official Rails 4.2 release.
Make sure that you have Bundler 1.10 or newer by running:
gem list | grep bundler
This should show you a line like this:
If your version is lower than
1.10, you can update Bundler like this:
gem install bundler
Please note that you need to have a compatible version of Bundler on all PCs that will be running your application (developer boxes, production servers, staging servers).
Open the Bundler configuration file (
Gemfile) in your project's root directory and find this line:
Replace that line with the following code:
source 'https://rubygems.org' source 'https://username:firstname.lastname@example.org' do gem 'rails', '~> 4.2.10' gem 'actionmailer', require: false gem 'actionpack', require: false gem 'activemodel', require: false gem 'activerecord', require: false gem 'activesupport', require: false gem 'railties', require: false gem 'actionview', require: false gem 'activejob', require: false gem 'railslts-version', require: false gem 'rack', require: false end
password with your personal credentials that you received after subscribing to Rails LTS.
Make sure a colon (
:) separates username and password.
If you don't want these credentials in your Gemfile, you can either
bundle config set gems.railslts.com username:password
In this case, just use
Note that our repositories are available via SSL (https) only,
http://... will not work.
Run Bundler to complete the installation:
bundle update rails
You might get a lot of unrelated upgrades. If you want to get as few updates as necessary, you can instead try to use this:
bundle update rails actionpack actionview actionmailer activemodel activerecord activesupport railties activejob --conservative
Decide whether to enable optional security enhancements shipped with Rails LTS.
In order to keep maximum compatibility to the official Ruby on Rails releases, Rails LTS disables all additional security features by default. We do however recommend the
:hardened configuration, which includes improvements we believe to be reasonable defaults for increased security in most applications.
Confirm that you are running the latest version of Rails 4.2 LTS.
Follow your normal release process (run tests, push, deploy to staging, do smoke/whatever testing, deploy to production).
Congratulations! You successfully deployed your application using Rails LTS.
If you have chosen to subscribe to the Rails LTS Notification List when signing up, you will be notified whenever a new patch for Rails LTS becomes available.
See installation instructions here.
YAML.safe_loadto deserialize certain database column. See details