Install a gem from a downloaded tar or zip

ruby-on-rails

Solution

You can do `gem build whatever.gemspec` inside of the directory that you untar/unzip -- that will produce a `.gem` file, then do `gem install whatever.gem`.

You need to be at the directory where you unzip the gem file for example

C:\railsinstaller\ruby2.2.0\lib\ruby\gems\2.2.0\gems> gem install rails-5.0.0.1.gem

and that's it - you are done downloading and installing Rails.

Problem

First let me say I cannot do gem install, I don't know why. Probably because I live in China and the firewall random things. So I have to locally install gems. For example, i want to install this gem riddle. But this gem downloads as a tar or zip and when i open it it is a folder not a .gem file. So what to do?

Original source