GitHub Package Registry for Ruby installation instructions

Since there was no forum for Package Registry, I’m posting this here.

In the RubyGem package page the following instructions are shown:
Install from the command line:

<font size="2">gem install package</font>

Install via Gemfile:

<font size="2">gem "@org/package" ~&gt; "0.5.0"</font>

Which is not correct in both cases. The correct instructions should be:

Install from the command line:

<font size="2">gem install package --source</font>

Install via Gemfile: (version selector was wrong)

<font size="2">gem "@org/package", "~&gt; 0.5.0", source: "<span>"</span></font>

The Configuring RubyGems for use with GitHub Package Registry help page does not include any details on how to add the source to the default sources for gem so specifying it is required.


Glad I’m not the only one who was confused by this. I thought RubyGems had some fancy new versioning syntax I wasn’t aware of!

This is pretty critical as any published gem will display these install instructions and immediately trip someone up if they copypasta.