ANN: RubyGems 0.9.0 Release

On Jul 3, 2006, at 6:37 AM, Erik V. wrote:

…/lib/rubygems/custom_require.rb:21:in `require__’:
No such file to load – fileutils (LoadError)

I did some more testing with more gems on different platforms.
The conclusion is twofold: a) The problem occurred with
RubyGems 0.8.11 as well (in combination with RubyScript2Exe
0.4.4) and b) it doesn’t occur with all gems (e.g. sqlite-ruby
is a problem, actionmailer isn’t).

Perhaps sqlite-ruby is an old format gem? It seems to be the

Which libraries are required conditionally by RubyGems?

I think zlib and yaml are the only others for making require work.
It is difficult to tell with just grep.


Eric H. - [email protected] - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com

Jim W. wrote:

There was a gem on rubyforge that somehow corrupted the gem index on
that site. A lot of people seemed to have downloaded the corrupted
index and it has been causing problems. The easiest way to deal with it
is to just delete your gem cache file.

Awesome. Thanks a lot, Jim.

Jeff

I did some more testing with more gems on different
platforms. The conclusion is twofold: a) The problem
occurred with RubyGems 0.8.11 as well (in combination with
RubyScript2Exe 0.4.4) and b) it doesn’t occur with all gems
(e.g. sqlite-ruby is a problem, actionmailer isn’t).

Perhaps sqlite-ruby is an old format gem? It seems to be the

It seems to be the /what/?.. Where is part two?.. This is
where I expected the most important part of the answer… ;]

Which libraries are required conditionally by RubyGems?

I think zlib and yaml are the only others for making require
work. It is difficult to tell with just grep.

I used a different kind of grep, called regexp.rb. It doesn’t
show the line on which a pattern occurs, but it only shows the
matching part of the line. It’s listed below. I used this
regexp.rb to find all libraries that /could/ be required by
RubyGems, both conditionally and unconditionally, listed in
list1.

The second list, list2, are the libraries that are actually
required after doing a “require ‘rubygems’”.

The differences between these lists are conditionally required
files (indicated with “-”) and indirectly required files
(indicated with “+”).

I’m concerned about the “-” part… ;]

(The lists may not be complete.)

Suggestions? Ideas?

gegroet,
Erik V. - http://www.erikveen.dds.nl/


$ find /usr/local/lib/ruby/site_ruby/1.8/rubygems*/ -type f -exec cat
{} ; | ruby regexp.rb “\brequire[(\s]*’"[’”]" | sort |
uniq > list1

$ ruby -rubygems -e ‘puts $".sort.join("\n")’ | sed ‘s/.[^.]*$//g’ >
list2

$ diff -ur list[12]
— list1 2006-07-05 11:13:14.086994100 +0200
+++ list2 2006-07-05 11:13:16.440354600 +0200
@@ -1,43 +1,19 @@
-digest/md5
+date/format
+digest
digest/sha2
-fileutils
-find
forwardable
-md5
-net/ftp
-net/http
-net/https
-openssl
-optparse
-pathname
+parsedate
+rational
rbconfig
-rdoc/rdoc
+rbconfig/datadir
rubygems
-rubygems/command
-rubygems/dependency_list
-rubygems/format
-rubygems/format.rb
-rubygems/gem_commands
+rubygems/custom_require
rubygems/gem_openssl
-rubygems/incremental_fetcher
-rubygems/installer
-rubygems/old_format
-rubygems/open-uri
-rubygems/package
+rubygems/rubygems_version
rubygems/security
rubygems/source_index
rubygems/specification
rubygems/user_interaction
rubygems/version
-socket
-sources
-stringio
-tempfile
-test/unit/ui/console/testrunner
time
-timeout
-uri
-x
-yaml
-yaml/syck
-zlib
+ubygems


chars = ‘^\s\r\n`!()[]{}<> ,./?\|=;:"’

chars11 = chars + “’”

chars21 = chars + “’”
chars22 = chars
chars23 = chars + “’”

chars31 = ‘\w\s\r\n’

string = ARGV.shift

regexp =
case string
when string.to_i.to_s then /(^\s*#{(["[^\s]+"] *
string.to_i).join("\s+")}\r*$)/
when “-word” then /([#{chars11}]+)/
when “-word2” then
/(#{chars21}?)/
when “-word3” then /([A-Za-z]+)/
when “-text” then /([#{chars31}]+)/
when “-file” then /(\w[\w.-])/
when “-path” then /(\w[\w.-/\\]
)/
when “-email” then /(\w[\w-.][email protected][\w-.]+\w)/
when “-url” then
/(\w+://[\w.-]+(:\d*)?/[\w.-/#?=%])/
when “-ip” then /(\d+.\d+.\d+.\d+)/
when “-mac” then
/(([0-9A-Fa-f]{2}[:.-]){5}[0-9A-Fa-f]{2})/
when “-print” then /([\w
\t\r\n`[email protected]#$%^&*()-+=[]{};:’",./<>
?\|]+)/
when “-noprint” then /([^\w
\t\r\n`[email protected]#$%^&*()-+=[]{};:’",./<>
?\|]+)/
when “-diff” then /(^-+?)/
when “-md5” then /([A-Za-z0-9]{32})/
when “-quote” then /("[^"]
")/
when “-mixedquote” then /([’"][^’"]*[’"])/
else
Regexp.new(string)
end

parse =
lambda do |f|
while (line = f.gets)
line.chomp.scan(regexp).each do |a|
puts a[0]
end
end
end

if ARGV.empty?
parse.call($stdin)
else
ARGV.each do |file|
File.open(file) do |f|
parse.call(f)
end
end
end

On Jul 5, 2006, at 2:28 AM, Erik V. wrote:

I did some more testing with more gems on different
platforms. The conclusion is twofold: a) The problem
occurred with RubyGems 0.8.11 as well (in combination with
RubyScript2Exe 0.4.4) and b) it doesn’t occur with all gems
(e.g. sqlite-ruby is a problem, actionmailer isn’t).

Perhaps sqlite-ruby is an old format gem? It seems to be the

It seems to be the /what/?.. Where is part two?.. This is
where I expected the most important part of the answer… ;]

Ooh, sorry, It seems to be the old format gems require fileutils but
the new format ones don’t. Also check out Mauricio’s mail.

list1.
(The lists may not be complete.)
uniq > list1
+date/format
-optparse
-rubygems/format.rb
rubygems/source_index
-uri
chars11 = chars + “’”
case string
when “-url” then
when “-diff” then /(^-+?)/
line.chomp.scan(regexp).each do |a|
parse.call(f)
end
end
end



Eric H. - [email protected] - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com

On Wed, Jul 05, 2006 at 12:34:03PM +0900, Eric H. wrote:

I did some more testing with more gems on different platforms.
The conclusion is twofold: a) The problem occurred with
RubyGems 0.8.11 as well (in combination with RubyScript2Exe
0.4.4) and b) it doesn’t occur with all gems (e.g. sqlite-ruby
is a problem, actionmailer isn’t).

Perhaps sqlite-ruby is an old format gem? It seems to be the

Maybe this is due to sqlite-ruby’s use of the evil (and now deprecated)
#autorequire?

Marshal.load(File.read(“source_cache”))[“http://gems.rubyforge.org”][“cache”].entries.find{|x, *a| /sqlite-ruby/ =~ x }
=> [“sqlite-ruby-2.0.2”, #<Gem::Specification:0xb741663c
@required_ruby_version=#<Gem::Version::Requirement:0xb7416434
@requirements=[[">=", #<Gem::Version:0xb74163bc @version=“1.8.0”>]]>,
@autorequire=“sqlite”, @bindir=nil, @require_paths=[“lib”],
===================
@rubygems_version=“0.8.11”, @description=nil, @dependencies=nil,
@specification_version=-1, @extensions=[“ext/extconf.rb”],
@platform=“ruby”,
@cert_chain=[], @requirements=nil, @rubyforge_project=nil,
@summary=“SQLite/Ruby is a module to allow Ruby scripts to interface
with a
SQLite database. VERSIONS >=2.0.0 ARE BETA RELEASES. THEY ARE INTENDED
FOR
TESTING ONLY, AND SHOULD NOT BE CONSIDERED PRODUCTION-WORTHY YET.”,
@rdoc_options=[], @extra_rdoc_files=[],
@version=#<Gem::Version:0xb741659c
@version=“2.0.2”>, @signing_key=nil,
@homepage=“http://sqlite-ruby.rubyforge.org”, @executables=nil,
@authors=nil,
@name=“sqlite-ruby”, @date=Mon Sep 13 04:19:04 CEST 2004,
@test_files=[],
@has_rdoc=true, @files=[], @email=“[email protected]”,
@default_executable=nil>]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs