Posted 8 months ago. Visible to the public.

Bundler: Releasing a gem with enabled 2FA

Rubygems supports a 2FA for your account. Once enabled you need to provide your personal OTP code for every release. Despite the CLI of the rake release task does not work well with the command promt for your OTP code with Bundler versions < 2.0.2. It just looks like the task is frozen:

Image

  • Workaround 1: Just type your OTP code and hit enter, your gem is released afterwards.
  • Workaround 2: Upgrade to Bundler >= 2.0.2.. Your supported Ruby versions for this gem must be all >= 2.3.

When you need to release a gem using an old Ruby version

If you need to release a gem with a legacy Ruby version like 1.8.7, the workarounds above won't work for you.

In this case, switch to a modern Ruby version only to make the release, then switch back.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Emanuel De
Last edit:
3 months ago
by Henning Koch
Attachments:
invisible_otp_promt.png
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Emanuel De to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more