[Rubygems-developers] Problems with RemoteInstaller
mfp at acm.org
Sat Nov 12 19:11:37 EST 2005
On Sat, Nov 12, 2005 at 07:04:18PM +0100, Florian Frank wrote:
> I hade some problems using the Rubygems RemoteInstaller. It requires a
> 'rubygems/open-uri.rb', that contains a copy of the 'open-uri.rb' file,
> that comes with Ruby. I think this was done to be compatible with older
> versions of Ruby.
It was a workaround for a bug in an older open-uri (as opposed to a way to
use open-uri in outdated Ruby setups).
> def open_uri_or_path(uri, &block)
> - require 'rubygems/open-uri'
> + begin
> + require 'open-uri'
> + rescue LoadError
> + require 'rubygems/open-uri'
> + end
If you go that way, just
would make more sense.
More information about the Rubygems-developers