[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby 1.9 and rubygems: should be able to use gem command?

David Palm

1/21/2008 12:18:00 PM

Hi all,
I've installed ruby 1.9 from trunk and I used the --prefix option to avoid conflicts with 1.8, like Dave Thomas advices here: http://pragdave.blogs.pragprog.com/pragdave/2007/12/ruby-19rig...

Everything seem to work splendidly, except for the "gem" command. The new install has an empty gems cache of course, so all operations that need to access that will try to bulk download the indexes from http://gems.rub...

All index downloading fails with a unhelpful "Error fetching remote gem cache: undefined method `[]=' for nil:NilClass"

I started to try to find out where the failure occurs and it seems like the guilty file is open-uri.rb (line 411), which is a call to the meta_add_field of the Meta module (adding http heders I guess) where the @meta inst var (a hash) is added to. The inst var isn't set, so that's the nil in the above error message. Why is @meta nil? I'd say it's because the Meta module isn't initialized properly, but I dont know why.

Before digging any deeper I wanted to ask you all: am I the only one having issues with the "gem" command? Should it work? Any workarounds? Am I missing something very basic?

Oh, versions:
gem -v => 1.0.1
ruby -v => ruby 1.9.0 (2008-01-21 revision 0) [i686-linux]

Platforms: MacOS X 10.5 and Ubuntu Feisty Fawn

Thanks for any pointers/comments!

2 Answers

Radoslaw Bulat

1/21/2008 5:51:00 PM

0

SSBoYXZlIHRoZSBzYW1lIGJlaGF2aW91ciwgYnV0IG9ubHkgaW4gdHJ1bmsgdmVyc2lvbi4gSSBz
dWdnZXN0IGZpbGUKdGhlIGJ1ZyBvbiBydWJ5Zm9yZ2UKKGh0dHA6Ly9ydWJ5Zm9yZ2Uub3JnL3Ry
YWNrZXIvP2F0aWQ9MTY5OCZncm91cF9pZD00MjYmZnVuYz1icm93c2UgLApmaXJzdCBjaGVjayBp
ZiBzb21vbmUgYWxyZWFkeSBkaWQgaXQpIGFuZCB1c2UgdmVyc2lvbiB0YWdnZWQgYXMKdjFfOV8w
XzAgKHJldmlzaW9uIDE0NzExKS4gSXQgc2hvdWxkIHdvcmsuCgoKLS0gClJhZG9zs2F3IEJ1s2F0
CgpodHRwOi8vcmFkYXJlay5qb2dnZXIucGwgLSBt82ogYmxvZwo=

Joel VanderWerf

1/21/2008 7:33:00 PM

0

David Palm wrote:
> Hi all,
> I've installed ruby 1.9 from trunk and I used the --prefix option to avoid conflicts with 1.8, like Dave Thomas advices here: http://pragdave.blogs.pragprog.com/pragdave/2007/12/ruby-19rig...
>
> Everything seem to work splendidly, except for the "gem" command. The new install has an empty gems cache of course, so all operations that need to access that will try to bulk download the indexes from http://gems.rub...
>
> All index downloading fails with a unhelpful "Error fetching remote gem cache: undefined method `[]=' for nil:NilClass"
>
> I started to try to find out where the failure occurs and it seems like the guilty file is open-uri.rb (line 411), which is a call to the meta_add_field of the Meta module (adding http heders I guess) where the @meta inst var (a hash) is added to. The inst var isn't set, so that's the nil in the above error message. Why is @meta nil? I'd say it's because the Meta module isn't initialized properly, but I dont know why.
>
> Before digging any deeper I wanted to ask you all: am I the only one having issues with the "gem" command? Should it work? Any workarounds? Am I missing something very basic?
>
> Oh, versions:
> gem -v => 1.0.1
> ruby -v => ruby 1.9.0 (2008-01-21 revision 0) [i686-linux]
>
> Platforms: MacOS X 10.5 and Ubuntu Feisty Fawn
>
> Thanks for any pointers/comments!

It seems to be working for me--I just installed the revactor gem for
1.9. My setup may be a little different. I configured with
--program-suffix=19 so that ruby 1.9 can live in /usr/local without
conflict.

$ gem19 -v
1.0.1
$ ruby19 -v
ruby 1.9.0 (2007-12-25 revision 14709) [i686-linux]
$ uname -a
Linux tumbleweed 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007
i686 GNU/Linux

(That's Gutsy Gibbon)

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407