> Below is the output from 'gem list -r' on my work computer right now.
> It seems a bit small. Is it correct? Where's 'activerecord', for
> instance?
>> Just checking before the release and all...
>> Gavin
I've narrowed down the problem to one line. I'm using a modified
remote_installer.rb, with the "fetch_sources" method reproduced below:
def fetch_source(source)
say "Updating Gem source index for: #{source}"
begin
require 'zlib'
yaml_spec = fetch(source + "/yaml.Z")
yaml_spec = Zlib::Inflate.inflate(yaml_spec)
rescue
yaml_spec = nil
end
yaml_spec = fetch(source + "/yaml") unless yaml_spec
File.open('yaml_spec1.dump', 'w') { |io| io.write(yaml_spec) }
spec = YAML.load(yaml_spec) # testing this line
File.open('yaml_spec2.dump', 'w') { |io| io.write(spec.to_yaml) }
raise "Didn't get a valid YAML document" if not spec
spec
end
The isolated line (spec = YAML.load(yaml_spec)) is the problem.
Logically, you'd expect the contents of yaml_spec1.dump and
yaml_spec2.dump to be very similar, but they're not. 'ls' shows:
620506 Sep 13 20:33 yaml_spec1.dump
51229 Sep 13 20:33 yaml_spec2.dump
yaml_spec2.dump is what 'gem' believes the remote source contains, hence
the problem described in the parent post, and hence I can't install rake.
$ grep -c rake- yaml_spec1.dump
7
$ grep -c rake- yaml_spec2.dump
0
I've attached these files as generated on my machine, which, by the way, is:
ruby 1.8.2 (2004-07-31) [i386-cygwin]
In order to force the yaml.Z download, I remove the "source_caches" file
each time I try to run the command 'gem install -r rake'.
This is obviously a big problem and I've no idea why it's happening. It
could be a YAML thing, but my Ruby is not old. I don't think this happens
on my home machine, so it could be a verion-of-Ruby thing. Could you guys
test it on your machines?
Sorry this email's so incoherent; I've been trying to fix this for hours
now and have run out of time.
Cheers,
Gavin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yaml_dumps.tgz
Type: application/x-compressed
Size: 78590 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20040913/261b4f03/yaml_dumps-0001.bin