Depending on the box used for the VM, the version of RubyGems might need updating. On the first attempt trying to install the Sinatra gem, I received the following message:
WARNING: RubyGems 1.2+ index not found for: http://rubygems.org/
Well 1.2 is out of date, let's fix that:
$ sudo gem update --system
On the second attempt, I got this error:
Error fetching data: SocketError: getaddrinfo: Name or service not known (http://rubygems.org/latest_specs.4.8.gz)
A connection to the internet wasn't the problem. Turns out the Chef recipes used a proxy with gem install
and the system remembers the previous setting next time it's run. Let's explicitly tell gem
not to use a proxy.
$ sudo gem install --no-http-proxy sinatra