gem install rails fails on ubuntu 12.04 on Oracle VirtualBox on Apple OS Mavericks

andrew.donovan's Avatar

andrew.donovan

20 Feb, 2014 06:02 PM

gem install rails --debug
Exception LoadError' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:169 - LoadError ExceptionResolv::ResolvTimeout' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:685 - Resolv::ResolvTimeout
Exception Resolv::ResolvTimeout' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:685 - Resolv::ResolvTimeout ExceptionResolv::ResolvTimeout' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:685 - Resolv::ResolvTimeout
Exception Resolv::ResolvTimeout' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:685 - Resolv::ResolvTimeout ExceptionResolv::ResolvError' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:1091 - DNS resolv timeout: rubygems._tcp.rubygems.org
Exception Resolv::ResolvError' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/resolv.rb:492 - DNS result has no information for _rubygems._tcp.rubygems.org ExceptionErrno::EEXIST' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:250 - File exists @ dir_s_mkdir - /home/ad/.gem/specs/rubygems.org%443
Exception Errno::ENOENT' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/remote_fetcher.rb:294 - No such file or directory @ rb_file_s_stat - /home/ad/.gem/specs/rubygems.org%443/latest_specs.4.8 ExceptionSocketError' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/net/http.rb:879 - getaddrinfo: Name or service not known
Exception Gem::RemoteFetcher::UnknownHostError' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/remote_fetcher.rb:283 - no such name (https://rubygems.org/latest_specs.4.8.gz) ExceptionGem::RemoteFetcher::UnknownHostError' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/site
ruby/2.1.0/rubygems/spec_fetcher.rb:268 - no such name (https://rubygems.org/latest_specs.4.8.gz)
Exception Gem::SpecificGemNotFoundException' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/dependency_installer.rb:297 - Could not find a valid gem 'rails' (>= 0) locally or in a repository ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/latest_specs.4.8.gz) ExceptionErrno::EEXIST' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/fileutils.rb:250 - File exists @ dir_s_mkdir - /home/ad/.gem/specs/rubygems.org%443
Exception `Errno::ENOENT' at /home/ad/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/remote_fetcher.rb:294 - No such file or directory @ rb_file_s_stat - /home/ad/.gem/specs/rubygems.org%443/prerelease_specs.4.8

  1. Support Staff 2 Posted by Eric Hodel on 20 Feb, 2014 07:01 PM

    Eric Hodel's Avatar

    It looks like your VM cannot connect to the internet

  2. 3 Posted by andrew.donovan on 20 Feb, 2014 07:17 PM

    andrew.donovan's Avatar

    Thanks Eric for you reply, I’ve checked the following:

    1. The VM guest i.e. Ubuntu can access the internet, both browser and command line – rvm and ruby already installed

    2. From another VM host (Windows) a Ubuntu guest can access rubygems ( the Ubuntu network setup in both cases is the same as the VM settings)

    3. From Mavericks rubygems is accessible.

    Therefore it appears the problem is probably somewhere in Mavericks regarding network access from the VM for certain sites , possibly https one, not sure at the moment.

  3. 4 Posted by andrew.donovan on 21 Feb, 2014 09:39 AM

    andrew.donovan's Avatar

    I’m going to switch to Scala/Play framework. The dependency on accessing rubygems is too significant and shouldn’t be such an issue, this is not the only time I’ve had problems downloading rubygems and I can’t think of another set of plugins or software extensions that has such a high profile in developing or testing apps.
    Thanks for your time and Regards

    From: Donovan, Andrew
    Sent: 20 February 2014 19:11
    To: 'Eric Hodel'
    Subject: RE: gem install rails fails on ubuntu 12.04 on Oracle VirtualBox on Apple OS Mavericks [Problems #16605]

    Thanks Eric for you reply, I’ve checked the following:

    1. The VM guest i.e. Ubuntu can access the internet, both browser and command line – rvm and ruby already installed

    2. From another VM host (Windows) a Ubuntu guest can access rubygems ( the Ubuntu network setup in both cases is the same as the VM settings)

    3. From Mavericks rubygems is accessible.

    Therefore it appears the problem is probably somewhere in Mavericks regarding network access from the VM for certain sites , possibly https one, not sure at the moment.

  4. 5 Posted by keenan on 03 Apr, 2014 06:51 PM

    keenan's Avatar

    Hi andrew,

    VirtualBox is very flakey with the internet connection, especially if you do hostonly connection, (e.g. default with Vagrant).

    When i do hostonly, I also setup a second nic which is NAT. That way I can get the best of both worlds.

    VMWare does not have this problem.

    Good luck.

  5. 6 Posted by andrew.donovan on 04 Apr, 2014 08:42 AM

    andrew.donovan's Avatar

    Thanks for reply, I’ve resolved it and can use rails 4 .
    Regards
    Andrew Donovan

  6. Nick Quaranto closed this discussion on 25 Apr, 2014 01:01 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 Aug, 2014 06:23 PM
28 Aug, 2014 07:18 PM
27 Aug, 2014 12:03 PM
26 Aug, 2014 07:09 PM
26 Aug, 2014 07:07 PM