The problem is that gem install is looking for gems to install in its default directory. You can find out where that is by running:
$ gem environment
This will give you something like:
> RubyGems Environment:
> - RUBYGEMS VERSION: 1.3.6
> - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
> - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
> - RUBY EXECUTABLE: /usr/bin/ruby1.8
> - EXECUTABLE DIRECTORY: /usr/bin
> - RUBYGEMS PLATFORMS:
> - ruby
> - x86-linux
> - GEM PATHS:
> - /usr/lib/ruby/gems/1.8
> - /home/adminuser/.gem/ruby/1.8
The GEM PATHS locations is where gem install is expecting to find gems to install. So, the solution to your problem would be to copy the gem from its current location to the expected directory, i.e.
$ cp my.gem /home/adminuser/.gem/ruby/1.8/
If you then run gem install it will pick up your gem and install it. Make sure you run the copy command as superuser (sudo, if you're running Ubuntu like me)
P.S If, when you run $ gem environment, you get an "undefined method ‘manage_gems’ for Gem:Module (NoMethodError)" error, then edit /usr/bin/gem and ensure that the first three lines of the file look like this:
- require 'rubygems'
- require 'rubygems/gem_runner'
- #Gem.manage_gems