From: Bret Weinraub Date: 2010-03-09T21:01:45+09:00 Subject: Re: All attempts to install gems hang 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.php?func=detail&aid=27946&group_id=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/.