[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Gem trouble

benjohn

12/9/2007 9:46:00 PM

I've been trying to use gems to instal rucola, and things aren't
going too well.

I'm using os x 10.4, and Ruby 1.8.2 on a power PC machine. My gem
version is 0.9.5

I was getting this segmentation fault:

> /usr/lib/ruby/site_ruby/1.8/rubygems/package.rb:620: [BUG]
> Segmentation fault
> ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]

I checked the line mentioned, and found this:

> # NOTE: Originally this method used two approaches, Return a
> GZipReader
> # directly, or read the GZipReader into a string and return a
> StringIO on
> # the string. The string IO approach was used for versions of
> ZLib before
> # 1.2.1 to avoid buffer errors on windows machines. Then we
> found that
> # errors happened with 1.2.1 as well, so we changed the
> condition. Then
> # we discovered errors occurred with versions as late as
> 1.2.3. At this
> # point (after some benchmarking to show we weren't seriously
> crippling
> # the unpacking speed) we threw our hands in the air and
> declared that
> # this method would use the String IO approach on all platforms
> at all
> # times. And that's the way it is.
> def zipped_stream(entry)
> # This is Jamis Buck's ZLib workaround. The original code is
> # commented out while we evaluate this patch.
> entry.read(10) # skip the gzip header
> zis = Zlib::Inflate.new(-Zlib::MAX_WBITS)
> is = StringIO.new(zis.inflate(entry.read))
> # zis = Zlib::GzipReader.new entry
> # dis = zis.read
> # is = StringIO.new(dis)
> ensure
> zis.finish if zis
> end


So I swapped out the patch and reverted to the earlier version. This
seems to have worked around the SEG fault, but now I'm getting this
instead:

> ERROR: While executing gem ... (TypeError)
> cannot convert nil into Array

This is all the errors / diagnostic information I get with the -V
(verbose) option.

Can anyone adviseon getting everything working smoothly again? My
apologies if I have left out critical and obvious diagnostic
material. I've just done a disk verify, and that's also come up clean
(not sure how thorough the Mac "Disk Utility" is).

Thanks very much,
Benjohn



3 Answers

benjohn

12/10/2007 6:17:00 AM

0


On 9 Dec 2007, at 21:45, Benjohn Barnes wrote:

> I've been trying to use gems to instal rucola, and things aren't
> going too well.
*snip*
> Can anyone adviseon getting everything working smoothly again? My
> apologies if I have left out critical and obvious diagnostic
> material. I've just done a disk verify, and that's also come up
> clean (not sure how thorough the Mac "Disk Utility" is).

One useful thing - this seems to happen for other gems too:

> benjohn # sudo gem instal sqlite
> Password:
> Updating metadata for 9 gems from http://gems.rub...
> .........
> complete
> ERROR: While executing gem ... (TypeError)
> cannot convert nil into Array
> benjohn #

or

> benjohn # sudo gem instal nitro -V
> Installing gem facets-1.4.5
> ERROR: While executing gem ... (TypeError)
> cannot convert nil into Array
> benjohn #

Thanks,
Benjohn

Eric Hodel

12/11/2007 12:47:00 AM

0

On Dec 9, 2007, at 13:45 PM, Benjohn Barnes wrote:

> This is all the errors / diagnostic information I get with the -V
> (verbose) option.
>
> Can anyone adviseon getting everything working smoothly again? My
> apologies if I have left out critical and obvious diagnostic
> material. I've just done a disk verify, and that's also come up
> clean (not sure how thorough the Mac "Disk Utility" is).

Try:

gem --debug install ...

benjohn

12/11/2007 7:46:00 AM

0


On 11 Dec 2007, at 00:47, Eric Hodel wrote:

> On Dec 9, 2007, at 13:45 PM, Benjohn Barnes wrote:
>
>> This is all the errors / diagnostic information I get with the -V
>> (verbose) option.
>>
>> Can anyone adviseon getting everything working smoothly again? My
>> apologies if I have left out critical and obvious diagnostic
>> material. I've just done a disk verify, and that's also come up
>> clean (not sure how thorough the Mac "Disk Utility" is).
>
> Try:
>
> gem --debug install ...

Thanks Eric!

I was going to try this when I got back from work, but work can wait
a few more minutes, I'm sure :-)

Here's what it says:

> benjohn # sudo gem instal rucola -V --debug
> Exception `NameError' at /usr/lib/ruby/site_ruby/1.8/rubygems/
> command_manager.rb:132 - uninitialized constant
> Gem::Commands::InstallCommand
> Exception `Gem::LoadError' at /usr/lib/ruby/site_ruby/1.8/
> rubygems.rb:377 - RubyGem version error: sources(0.0.1 not > 0.0.1)
>
> Installing gem rubynode-0.1.4
> Exception `TypeError' at /usr/lib/ruby/site_ruby/1.8/rubygems/
> version.rb:127 - cannot convert nil into Array
> ERROR: While executing gem ... (TypeError)
> cannot convert nil into Array
> /usr/lib/ruby/site_ruby/1.8/rubygems/version.rb:127:in `<=>'
> /usr/lib/ruby/site_ruby/1.8/rubygems/version.rb:127:in `<=>'
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:24:in `>='
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:24
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:24:in
> `call'
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:124:in
> `satisfy?'
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:117:in
> `satisfied_by?'
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:117:in
> `all?'
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:117:in
> `each'
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:117:in
> `all?'
> /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:117:in
> `satisfied_by?'
> /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:84:in
> `install'
> /usr/lib/ruby/site_ruby/1.8/rubygems/
> dependency_installer.rb:225:in `install'
> /usr/lib/ruby/site_ruby/1.8/rubygems/
> dependency_installer.rb:207:in `each'
> /usr/lib/ruby/site_ruby/1.8/rubygems/
> dependency_installer.rb:207:in `install'
> /usr/lib/ruby/site_ruby/1.8/rubygems/commands/
> install_command.rb:69:in `execute'
> /usr/lib/ruby/site_ruby/1.8/rubygems/commands/
> install_command.rb:65:in `each'
> /usr/lib/ruby/site_ruby/1.8/rubygems/commands/
> install_command.rb:65:in `execute'
> /usr/lib/ruby/site_ruby/1.8/rubygems/command.rb:136:in
> `invoke'
> /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:
> 104:in `process_args'
> /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:
> 74:in `run'
> /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in `run'
> /usr/bin/gem:22
> benjohn #

So, some worrying looking stuff at the start that it gets past, and
then perhaps no gem matches the version requirements that it's got at
a later point? I'll dig deeper tonight if no one recognises this one
and comes back with a suggestion.

Thanks again!

Cheers,
Benjohn