[Rubygems-developers] Problems with RemoteInstaller
chad at chadfowler.com
Sun Nov 13 09:07:44 EST 2005
On Nov 12, 2005, at 7:11 PM, Mauricio Fernández wrote:
> 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'
>> that comes with Ruby. I think this was done to be compatible with
>> 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
> require 'open-uri'
> would make more sense.
Yes, true. We should do some testing with various open-uri versions
and perhaps change the minimum ruby version requirement for rubygems.
More information about the Rubygems-developers