From: Eric Hodel Date: 2008-03-22T06:55:12+09:00 Subject: Re: autoinstall gems On Mar 13, 2008, at 01:20 AM, S2 wrote: > Is there a way to autoinstall a gem when it is "required" in an .rb > file? > > say I have: > > > ----- > #!/usr/bin/ruby > > require 'rubygems' > require 'HOTP' > > puts HOTP.new.calculate_hotp('12345', 1, 6) > ----- > > > Is there a way to make rubygems autoinstall the HOTP gem if it is > not already installed? No, as the list of files in a gem is only available after installation.