No gems shown in the index #84

Closed
mfloryan opened this Issue Nov 16, 2012 · 9 comments

Comments

Projects
None yet
6 participants

ruby-1.9.1
geminabox 0.8.0
Windows Server 2008 R2 SP1 (64bit)

After installing the geminabox server it is starting OK, presents an index page but every time a new gem is uploaded (either through the upload button or through gem inabox command) the indexing seems to fail with the following error:

ERROR: Unable to process ./data/gems/bundler-1.2.2.gem
no metadata found in ./data/gems/bundler-1.2.2.gem (Gem::Package::FormatError)

The same happens for any gem I tried. The index page does not list any installed gems (from the spec I suspect it should). However, gem install does seem to work for some of the gems.

Tested it again and it turns out that running the following command:
gem generate_index -d data/ return the same set of problems.

Hence I suspect the gem files get perhaps somehow corrupted on upload? Is that possible?
If I manually copy the same files to the gems folder on the server it works OK.

I'm seeing the same thing on Windows, no problem on OS X.

I'm seeing the same thing. Looking at the logs, I see this error whenever I upload a gem. I've also tried it with a gem from RubyGems (so that I know it's not a problem with the gem itself) and I still get this error.

corrupt gem (Gem::Package::TarInvalidError: tar is corrupt, name contains null byte)

I've tried this on two servers:

  1. Ruby 1.9.3
    geminabox 0.8.0
    Windows Server 2008 R2 SP1 (64 bit)
  2. Ruby 1.9.3
    geminabox 0.8.0
    Windows 7 Enterprise (64 bit)

bebac commented Apr 11, 2013

I am seeing this same issue, also on windows. Tried with webrick and thin.

ruby 1.9.3
geminabox 0.10.1

Did anyone get geminabox working on windows?

@bebac Nope, we ended up moving our geminabox to a mac mini.

bebac commented Apr 11, 2013

@stefanmoser Thank you for the update

I investigated a little more and it seems to be a problem with Tempfile which corrupts the file as indicated by @mfloryan. I haven't figured out what's going wrong with Tempfile, but I actually got something running by eliminating the use of Tempfile. It is a major hack though as it messes up atomic_write and IncomingGem.

bebac commented Apr 17, 2013

The problem was trivial, Tempfile simply wasn't in binary mode.

mfloryan commented Jun 4, 2013

I see there is a new pull request by @bebac with the changes. When this is merged in, we should be able to close this one.

tomlea added the Stale label Feb 15, 2016

tomlea closed this Feb 15, 2016

kmai00 commented Apr 7, 2017

I know this is closed and over, but I recently bumped into this problem with 0.,12.4.

The problem for me is that in the config.ru, i was having the data dir set as "E:\data" instead of "E:/data"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment