Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > All attempts to install gems hang

Reply
Thread Tools

All attempts to install gems hang

 
 
Evan Dorn
Guest
Posts: n/a
 
      02-13-2010
For a couple weeks, I haven't been able to install any gems on my
MacBook Pro. I got so fed up with it that I eventually even wiped and
reinstalled the drive and OS ... and the problem hasn't gone away.

Here's what happens when I try to install a gem (with verbose debugger
output). Here I've used gemcutter, but this happens with every gem.

Code:
mbp:~ evan$ sudo gem install --verbose --debug gemcutter
Password:
Exception `NameError' at
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:161 -
uninitialized constant Gem::Commands::InstallCommand
Exception `Gem::LoadError' at
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:827 - Could not find
RubyGem test-unit (>= 0)

Exception `Gem::LoadError' at
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:827 - Could not find
RubyGem sources (> 0.0.1)

GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz
GET 200 OK: http://production.s3.rubygems.org/latest_specs.4.8.gz
GET 302 Found:
http://gems.rubyforge.org/quick/Marshal.4.8/gemcutter-0.3.0.gemspec.rz
GET 200 OK:
http://production.s3.rubygems.org/quick/Marshal.4.8/gemcutter-0.3.0.gemspec.rz
GET 302 Found:
http://gems.rubyforge.org/quick/Marshal.4.8/json_pure-1.2.0.gemspec.rz
GET 200 OK:
http://production.s3.rubygems.org/quick/Marshal.4.8/json_pure-1.2.0.gemspec.rz
Installing gem json_pure-1.2.0
Downloading gem json_pure-1.2.0.gem
GET 302 Found: http://gems.rubyforge.org/gems/json_pure-1.2.0.gem
Here's gem env:

Code:
mbp:~ evan$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.0.0]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-10
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /Users/evan/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/

Here's what I've installed on this computer:
1) Fresh wipe of HD
2) Install Snow Leopard
3) Install Apple Developer tools / xcode
4) Install textmate and Path Finder
5) Install Ruby and Rubygems exactly as per hivelogic:
http://hivelogic.com/articles/compil...-snow-leopard/
6) Install mysql as per hivelogic:
http://hivelogic.com/articles/compil...-snow-leopard/

That's it. Attempted to gem install gemcutter and gem install mysql
and got the errors shown above.

The ruby process hangs and shows in top as "sleeping", using 0.3% of
CPU. I've let it sit there for at least 30 minutes with no change.

Any suggestions?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Roger Pack
Guest
Posts: n/a
 
      02-14-2010
> /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb

Maybe it's using an "old version" of some of the libraries or what not?
If I were you I would reinstall ruby to some "special" location (like
$HOME/installs), then install rubygems into that instance and use it
from there.
HTH.
-r
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Bret Weinraub
Guest
Posts: n/a
 
      02-16-2010
Evan Dorn wrote:
> For a couple weeks, I haven't been able to install any gems on my
> MacBook Pro. I got so fed up with it that I eventually even wiped and
> reinstalled the drive and OS ... and the problem hasn't gone away.
>
> Here's what happens when I try to install a gem (with verbose debugger
> output). Here I've used gemcutter, but this happens with every gem.
>
>
Code:
> mbp:~ evan$ sudo gem install --verbose --debug gemcutter
> Password:
> Exception `NameError' at
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:161 -
> uninitialized constant Gem::Commands::InstallCommand
> Exception `Gem::LoadError' at
> /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:827 - Could not find
> RubyGem test-unit (>= 0)
>
> Exception `Gem::LoadError' at
> /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:827 - Could not find
> RubyGem sources (> 0.0.1)
>
> GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz
> GET 200 OK: http://production.s3.rubygems.org/latest_specs.4.8.gz
> GET 302 Found:
> http://gems.rubyforge.org/quick/Marshal.4.8/gemcutter-0.3.0.gemspec.rz
> GET 200 OK:
> http://production.s3.rubygems.org/quick/Marshal.4.8/gemcutter-0.3.0.gemspec.rz
> GET 302 Found:
> http://gems.rubyforge.org/quick/Marshal.4.8/json_pure-1.2.0.gemspec.rz
> GET 200 OK:
> http://production.s3.rubygems.org/quick/Marshal.4.8/json_pure-1.2.0.gemspec.rz
> Installing gem json_pure-1.2.0
> Downloading gem json_pure-1.2.0.gem
> GET 302 Found: http://gems.rubyforge.org/gems/json_pure-1.2.0.gem
>
>
> Here's gem env:
>
>
Code:
> mbp:~ evan$ gem env
> RubyGems Environment:
>   - RUBYGEMS VERSION: 1.3.5
>   - RUBY VERSION: 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.0.0]
>   - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
>   - RUBY EXECUTABLE: /usr/local/bin/ruby
>   - EXECUTABLE DIRECTORY: /usr/local/bin
>   - RUBYGEMS PLATFORMS:
>     - ruby
>     - x86-darwin-10
>   - GEM PATHS:
>      - /usr/local/lib/ruby/gems/1.8
>      - /Users/evan/.gem/ruby/1.8
>   - GEM CONFIGURATION:
>      - :update_sources => true
>      - :verbose => true
>      - :benchmark => false
>      - :backtrace => false
>      - :bulk_threshold => 1000
>   - REMOTE SOURCES:
>      - http://gems.rubyforge.org/
>
>
>
> Here's what I've installed on this computer:
> 1) Fresh wipe of HD
> 2) Install Snow Leopard
> 3) Install Apple Developer tools / xcode
> 4) Install textmate and Path Finder
> 5) Install Ruby and Rubygems exactly as per hivelogic:
> http://hivelogic.com/articles/compil...-snow-leopard/
> 6) Install mysql as per hivelogic:
> http://hivelogic.com/articles/compil...-snow-leopard/
>
> That's it. Attempted to gem install gemcutter and gem install mysql
> and got the errors shown above.
>
> The ruby process hangs and shows in top as "sleeping", using 0.3% of
> CPU. I've let it sit there for at least 30 minutes with no change.
>
> Any suggestions?


Hey me too! I've been through a maze of a 1000 twisty passages; all
alike.

RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/

gem --debug install ruby-debug
Exception `NameError' at
/usr/lib/ruby/1.8/rubygems/command_manager.rb:161 - uninitialized
constant Gem::Commands::InstallCommand
Exception `Gem::LoadError' at /usr/lib/ruby/1.8/rubygems.rb:827 - Could
not find RubyGem test-unit (>= 0)

Exception `Gem::LoadError' at /usr/lib/ruby/1.8/rubygems.rb:827 - Could
not find RubyGem sources (> 0.0.1)

Exception `Errno::ENOENT' at /usr/lib/ruby/1.8/fileutils.rb:243 - No
such file or directory - /root/.gem/specs/gems.rubyforge.org%80
Exception `Errno::ENOENT' at /usr/lib/ruby/1.8/fileutils.rb:243 - No
such file or directory -
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem
Exception `Errno::ENOENT' at /usr/lib/ruby/1.8/fileutils.rb:243 - No
such file or directory -
/root/.gem/specs/gems.rubyforge.org%80/quick/Marshal.4.8
Exception `Errno::ENOENT' at /usr/lib/ruby/1.8/fileutils.rb:243 - No
such file or directory -
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem/specs
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem/specs/gems.rubyforge.org%80
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem/specs/gems.rubyforge.org%80/quick/Marshal.4.8
Exception `Errno::EEXIST' at /usr/lib/ruby/1.8/fileutils.rb:243 - File
exists - /root/.gem/specs/gems.rubyforge.org%80
Exception `#<Class:0xb650d708>' at /usr/lib/ruby/1.8/timeout.rb:60 -
execution expired
Exception `Timeout::Error' at /usr/lib/ruby/1.8/timeout.rb:74 -
execution expired
Exception `Gem::RemoteFetcher::FetchError' at
/usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:170 - timed out
(http://gems.rubyforge.org/quick/Mars...0.3.gemspec.rz)
Exception `Gem::RemoteFetcher::FetchError' at
/usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:76 - timed out
(http://gems.rubyforge.org/quick/Mars...0.3.gemspec.rz)
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Bret Weinraub
Guest
Posts: n/a
 
      02-16-2010
I've managed to get some progress (I can actually install a gem) if I
specify --ignore-dependencies.

This and a combination of "wget"-ing the gems and installing them
locally; I actually got the ruby debugger installed.


Somehow I've got a hunch that this is something to do with networking
(this box is NAT-ed); but EVERYTHING else works fine. Sniffle....

-b
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Evan Dorn
Guest
Posts: n/a
 
      02-16-2010
Bret Weinraub wrote:
> I've managed to get some progress (I can actually install a gem) if I
> specify --ignore-dependencies.



Interesting, I may have to try that.

I did in fact get gems working just by using Apple's pre-install Ruby
and Gems.

I couldn't do that with 10.5, because the pre-installed Ruby was 1.8.6
rather than 1.8.7, and I had compatibility problems with some of my
plugins under 1.8.6. But so far it's working for Snow Leopard.

It's frustrating, though, that building my own Ruby would cause such a
problem. It works just fine on on my desktop (Mac Pro) - it's only on
the laptop where it's been a problem.


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Bret Weinraub
Guest
Posts: n/a
 
      02-16-2010
Evan Dorn wrote:
> Bret Weinraub wrote:
>> I've managed to get some progress (I can actually install a gem) if I
>> specify --ignore-dependencies.

>
>
> Interesting, I may have to try that.
>
> I did in fact get gems working just by using Apple's pre-install Ruby
> and Gems.
>
> I couldn't do that with 10.5, because the pre-installed Ruby was 1.8.6
> rather than 1.8.7, and I had compatibility problems with some of my
> plugins under 1.8.6. But so far it's working for Snow Leopard.
>
> It's frustrating, though, that building my own Ruby would cause such a
> problem. It works just fine on on my desktop (Mac Pro) - it's only on
> the laptop where it's been a problem.


Although I never actually was able to put my finger on something that
fully did not work, I was able to resolve my problem via voodoo rites.

Basically this Ubuntu instance was running in Virtual Box on a Win7
machine. Now virtual box (like a lot of virtualization software)
generally defaults to NAT (network address translation) for network
connectivity.

Switching to "Bridged" on the interface pretty much cleared up the
problem; even though heavy network users like "apt-get" functioned just
fine. Whatever flakiness exists in the network only manifested itself
with "gem install". Bridged gives you a real address on your network,
instead of your packets being rewritten by the "host" machine.

I've seen of this with some VPN software; just will not function over a
NAT-ed interface. Switch to bridged, and its all good.

Probably should be a bug report for rubygems; it won't run off a NAT-ed
VM.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Magnus Hjelmblom
Guest
Posts: n/a
 
      03-08-2010
Bret Weinraub wrote:
> Basically this Ubuntu instance was running in Virtual Box on a Win7
> machine. Now virtual box (like a lot of virtualization software)
> generally defaults to NAT (network address translation) for network
> connectivity.
>
> Switching to "Bridged" on the interface pretty much cleared up the
> problem; even though heavy network users like "apt-get" functioned just
> fine. Whatever flakiness exists in the network only manifested itself
> with "gem install". Bridged gives you a real address on your network,
> instead of your packets being rewritten by the "host" machine.
>
> I've seen of this with some VPN software; just will not function over a
> NAT-ed interface. Switch to bridged, and its all good.
>
> Probably should be a bug report for rubygems; it won't run off a NAT-ed
> VM.


So, for me (and my students) who can't switch to bridged due to the
university's security policies, there basically is no solution? Wow.
This is killing me, new troubles every time I give this course. I
seriously must reconsider using Rails.

I suppose I could use aptitude to get an older Rails version, and do a
'gem freeze' for the application instead of upgrading Rails on the
server?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Bret Weinraub
Guest
Posts: n/a
 
      03-08-2010
Magnus Hjelmblom wrote:
> Bret Weinraub wrote:
>> Basically this Ubuntu instance was running in Virtual Box on a Win7
>> machine. Now virtual box (like a lot of virtualization software)
>> generally defaults to NAT (network address translation) for network
>> connectivity.
>>
>> Switching to "Bridged" on the interface pretty much cleared up the
>> problem; even though heavy network users like "apt-get" functioned just
>> fine. Whatever flakiness exists in the network only manifested itself
>> with "gem install". Bridged gives you a real address on your network,
>> instead of your packets being rewritten by the "host" machine.
>>
>> I've seen of this with some VPN software; just will not function over a
>> NAT-ed interface. Switch to bridged, and its all good.
>>
>> Probably should be a bug report for rubygems; it won't run off a NAT-ed
>> VM.

>
> So, for me (and my students) who can't switch to bridged due to the
> university's security policies, there basically is no solution? Wow.
> This is killing me, new troubles every time I give this course. I
> seriously must reconsider using Rails.
>
> I suppose I could use aptitude to get an older Rails version, and do a
> 'gem freeze' for the application instead of upgrading Rails on the
> server?


I blame myself for not filing a bug on rubyforge for this:

http://rubyforge.org/tracker/?atid=5...26&func=browse

Maybe you can pick up the torch? I have some more suggestions on this
problem that I will post tomorrow.

-bret
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Bret Weinraub
Guest
Posts: n/a
 
      03-09-2010
Magnus Hjelmblom wrote:
> Bret Weinraub wrote:
>> Basically this Ubuntu instance was running in Virtual Box on a Win7
>> machine. Now virtual box (like a lot of virtualization software)
>> generally defaults to NAT (network address translation) for network
>> connectivity.
>>
>> Switching to "Bridged" on the interface pretty much cleared up the
>> problem; even though heavy network users like "apt-get" functioned just
>> fine. Whatever flakiness exists in the network only manifested itself
>> with "gem install". Bridged gives you a real address on your network,
>> instead of your packets being rewritten by the "host" machine.
>>
>> I've seen of this with some VPN software; just will not function over a
>> NAT-ed interface. Switch to bridged, and its all good.
>>
>> Probably should be a bug report for rubygems; it won't run off a NAT-ed
>> VM.

>
> So, for me (and my students) who can't switch to bridged due to the
> university's security policies, there basically is no solution? Wow.
> This is killing me, new troubles every time I give this course. I
> seriously must reconsider using Rails.
>
> I suppose I could use aptitude to get an older Rails version, and do a
> 'gem freeze' for the application instead of upgrading Rails on the
> server?


Here are some alternative options:

- yes use gem:freeze should allow you to get the app working somewhere
else, and then you can just pull the app onto the NAT-ed box.
- you can also install the gems from the source. It really isn't that
bad to do this, and you probably only need half a dozen gems for rails.
- you can push the whole thing into the cloud; I for one like linode :
www.linode.com

For what its worth gem isn't the ONLY piece of software that won't run
on certain NAT-ed machines; I've experienced a similar problem with some
VPN software.

Anyways I opened a bug for this

http://rubyforge.org/tracker/index.p...d=126&atid=575

and if you could update the bug description (or post and I will attach)
your "gem env" and the debugging output of your "gem update" command.
I'm sure that's more than a few people who've been frustrated by this.

Thanks.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't install gems after a new ubuntu install Max Williams Ruby 12 07-13-2008 07:41 PM
Fail to Install Gems - My First Gems Foolish Brat Ruby 4 09-10-2007 02:51 AM
Gems -- #include <gems.hpp> Tomás C++ 7 03-05-2006 02:48 PM
'private' gems/gems hierarchy Dany Cayouette Ruby 3 11-25-2005 10:55 PM
Confusion about gems and non-gems working together. Lloyd Zusman Ruby 3 06-20-2005 11:23 PM



Advertisments