You can install a gem from github or filesystem. If the gem has been checked out from git or somehow already on the file system, you could install it using

gem install --local path_to_gem/filename.gem

Installing gem from github. Download the sources from github

mkdir newgem
cd newgem
git clone <https://urltogem.git>

Build the gem

gem build GEMNAME.gemspec
gem install gemname-version.gem