Forum: Ruby Unable to install rack gem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Robert S. (Guest)
on 2009-05-19 16:21
I have been trying to install the twitter gem on Ubuntu and have been
unable to do so.  Rack and Thin are both dependencies of the twitter gem
and there seems to be a circular dependency between rack and thin.  When
I try to install rack I get:

removed_email_address@domain.invalid:~$ gem install rack
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  While executing gem ... (Gem::GemNotFoundException)
    Could not find rack (> 0) in any repository
rstackhouse@rstackhouse:~$ sudo gem install rack
[sudo] password for user:
Need to update 36 gems from http://gems.rubyforge.org
....................................
complete
Install required dependency thin? [Yn]  Y
Select which gem to install for your platform (x86_64-linux)
 1. thin 1.2.1 (i386-mswin32)
 2. thin 1.2.1 (ruby)
 3. thin 1.0.0 (ruby)
 4. thin 1.0.0 (i386-mswin32)
 5. Skip this gem
 6. Cancel installation
> 2
Install required dependency rack? [Yn]



I get the following if I try to install thin:

rstackhouse@rstackhouse:~$ sudo gem install thin
Select which gem to install for your platform (x86_64-linux)
 1. thin 1.2.1 (i386-mswin32)
 2. thin 1.2.1 (ruby)
 3. thin 1.0.0 (ruby)
 4. thin 1.0.0 (i386-mswin32)
 5. Skip this gem
 6. Cancel installation
> 2
Install required dependency rack? [Yn]  Y
Install required dependency thin? [Yn]



So it seems pretty obvious to me that there is a circular dependency
between these two gems.  Can anyone help me resolve this problem?
Hassan S. (Guest)
on 2009-05-19 18:31
(Received via mailing list)
On Tue, May 19, 2009 at 5:21 AM, Robert Stackhouse
<removed_email_address@domain.invalid> wrote:

> So it seems pretty obvious to me that there is a circular dependency
> between these two gems.

Uh, well --

[hassan@sailboat ~]$ sudo gem install rack
Successfully installed rack-1.0.0
1 gem installed
Installing ri documentation for rack-1.0.0...
Installing RDoc documentation for rack-1.0.0...
[hassan@sailboat ~]$ sudo gem install thin
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Successfully installed eventmachine-0.12.6
Successfully installed thin-1.2.1
2 gems installed
Installing ri documentation for eventmachine-0.12.6...
Installing ri documentation for thin-1.2.1...
Installing RDoc documentation for eventmachine-0.12.6...
Installing RDoc documentation for thin-1.2.1...
[hassan@sailboat ~]$

(on a RHEL VM, not Ubuntu, but shouldn't matter...)

What version of ruby and rubygems are you running? This was on:
[hassan@sailboat ~]$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.7 (2009-02-16 patchlevel 5000) [i686-linux]

FWIW,
Robert S. (Guest)
on 2009-05-19 19:38
Hassan S. wrote:
> On Tue, May 19, 2009 at 5:21 AM, Robert Stackhouse
> <removed_email_address@domain.invalid> wrote:
>
>> So it seems pretty obvious to me that there is a circular dependency
>> between these two gems.
>
> Uh, well --
>
> [hassan@sailboat ~]$ sudo gem install rack
> Successfully installed rack-1.0.0
> 1 gem installed
> Installing ri documentation for rack-1.0.0...
> Installing RDoc documentation for rack-1.0.0...
> [hassan@sailboat ~]$ sudo gem install thin
> Building native extensions.  This could take a while...
> Building native extensions.  This could take a while...
> Successfully installed eventmachine-0.12.6
> Successfully installed thin-1.2.1
> 2 gems installed
> Installing ri documentation for eventmachine-0.12.6...
> Installing ri documentation for thin-1.2.1...
> Installing RDoc documentation for eventmachine-0.12.6...
> Installing RDoc documentation for thin-1.2.1...
> [hassan@sailboat ~]$
>
> (on a RHEL VM, not Ubuntu, but shouldn't matter...)
>
> What version of ruby and rubygems are you running? This was on:
> [hassan@sailboat ~]$ gem env
> RubyGems Environment:
>   - RUBYGEMS VERSION: 1.3.1
>   - RUBY VERSION: 1.8.7 (2009-02-16 patchlevel 5000) [i686-linux]
>
> FWIW,

I am running:

removed_email_address@domain.invalid:~$ gem env
RubyGems Environment:
  - VERSION: 0.9.4 (0.9.4)
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - GEM PATH:
     - /var/lib/gems/1.8
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
removed_email_address@domain.invalid:~$ ruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]

Looks like I am running a much older version of rubygems than you are
Hassan.  Where/how could I get a more recent version?
Urban H. (Guest)
on 2009-05-19 19:42
(Received via mailing list)
Robert Stackhouse wrote:

> Looks like I am running a much older version of rubygems than you are
> Hassan.  Where/how could I get a more recent version?

gem update --system

Urban
Robert S. (Guest)
on 2009-05-19 20:20
Urban H. wrote:
> Robert Stackhouse wrote:
>
>> Looks like I am running a much older version of rubygems than you are
>> Hassan.  Where/how could I get a more recent version?
>
> gem update --system
>
> Urban

I tried "gem update --system" then I got:

removed_email_address@domain.invalid:~/rubygems-1.3.3$ gem ver
/usr/bin/gem:10: undefined method `manage_gems' for Gem:Module
(NoMethodError)


So I googled around and was lead to this page:
http://www.jaredlog.com/?p=1045&dsq=9540882.  I tried his approach and
got the same error message as above.

Anyone got any ideas?
Julian L. (Guest)
on 2009-05-19 20:34
(Received via mailing list)
On 20/05/2009, at 2:20 AM, Robert Stackhouse
<removed_email_address@domain.invalid> wrote:

>
>
> Anyone got any ideas?
>
> --
> Posted via http://www.ruby-forum.com/.

Perhaps you need to upgrade by manually installing. Which version of
gem do you have?

Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r
Learn: http://sensei.zenunit.com/
New video up now at http://sensei.zenunit.com/ real fastcgi rails
deploy process! Check it out now!
Hassan S. (Guest)
on 2009-05-19 20:39
(Received via mailing list)
On Tue, May 19, 2009 at 9:20 AM, Robert Stackhouse
<removed_email_address@domain.invalid> wrote:

> I tried "gem update --system" then I got:
>
> removed_email_address@domain.invalid:~/rubygems-1.3.3$ gem ver
> /usr/bin/gem:10: undefined method `manage_gems' for Gem:Module
> (NoMethodError)

<http://blog.segment7.net/articles/2009/01/15/usr-b...
Robert S. (Guest)
on 2009-05-19 22:01
Hassan S. wrote:
> On Tue, May 19, 2009 at 9:20 AM, Robert Stackhouse
> <removed_email_address@domain.invalid> wrote:
>
>> I tried "gem update --system" then I got:
>>
>> removed_email_address@domain.invalid:~/rubygems-1.3.3$ gem ver
>> /usr/bin/gem:10: undefined method `manage_gems' for Gem:Module
>> (NoMethodError)
>
> 
<http://blog.segment7.net/articles/2009/01/15/usr-b...

Thanks Hassan.  That last link solved my issue.

Robert
This topic is locked and can not be replied to.