Installing Rails 5.2 LTS
This document describes how to swap out the official Rails 5.2 gems with Rails 5.2 LTS Archive . If you have installed Rails LTS before and want to update to a newer version, please see our update instructions.
Prerequisites
-
Subscribe to a Rails LTS plan Archive 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 5.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 5.2 release.
Installation
-
Open the Bundler configuration file (
Gemfile
) in your project's root directory and find this line:Copygem 'rails'
Replace that line with the following code:
Copysource 'https://username:password@gems.railslts.com' do gem 'rails', '~> 5.2.7' gem 'actioncable', require: false gem 'actionmailer', require: false gem 'actionpack', require: false gem 'actionview', require: false gem 'activejob', require: false gem 'activemodel', require: false gem 'activerecord', require: false gem 'activestorage', require: false gem 'activesupport', require: false gem 'railties', require: false gem 'railslts-version', require: false end
Replace
username
andpassword
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 also set them in an environment variableBUNDLE_GEMS__RAILSLTS__COM=username:password
.Note that our repositories are available via SSL (https) only,
http://...
will not work. -
Run Bundler to complete the installation:
Copybundle 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:
Copybundle update rails actionpack actionview actionmailer activemodel activerecord activesupport railties activejob actioncable activestorage --conservative
-
Confirm that you are running the latest version of Rails 5.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.
makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.