Picked up a server that needed gems but had no internet access. Copied the .gem files across and ran this to install them all in one go:
gem install --force --local *.gem
The --force flag is what does the trick here. Without it, gem will skip any files that are already installed, even if they’re older versions. With --local, it looks only in the current directory instead of trying to reach out to rubygems.org.