[Rubygems-developers] index_gem_repository problem

Jim Weirich jim.weirich at gmail.com
Mon Mar 12 07:54:38 EDT 2007

On 3/12/07, Chad Woolley <thewoolleyman at gmail.com> wrote:
> As for your problem with index_gem_repository - did you pull down the
> whole "1.8" dir?  For example, you should have copied
> "/usr/local/lib/ruby/gems/1.8/" to some dir on your machine.

I don't think this is needed for index_gem_repository.  I run my
betagems directory with just a single subdirectory containing the .gem
files.  The index_gem_repository script generates the top level
index.html, yaml and yaml.Z files as well as the quick directory and
its subdirectories.

Your directory structure should be like this:

    main_directory (this is my betagems directory here)
        gem (this contains all the .gem files)

That should be sufficient.  The index_gem_repository script should
generate everything else.  The main_directory is where the -d option
should point.

The error is occurring because File.read(file_path, 20) is returning a
nil.  "file_path" should refer to a .gem file at this point, so I
would recommend double check that all the .gem files are readable and
have good data (a zero length .gem file could possibly cause this

Hope this helps.

-- Jim Weirich    jim at weirichhouse.org     http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rubygems-developers mailing list