Reputation: 3494
I am trying to run
gem install rspec --version 3.2.0
from Cloud9. It gives me this error:
ERROR: Could not find a valid gem 'rspec' (= 3.2.0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/specs.4.8.gz)
When I run the same command from a linux terminal it successfully installs the desired gem (six gems in total).
Why do I get the error on Cloud9?
I also have a file called Gemfile in my Workspace on Cloud9 with contents:
source "https://rubygems.org"
gem "rspec", "~> 3.2.0
Trying the following command on the Cloud9 command line:
bundle install
I get the following:
Fetching source index from https://rubygems.org/
Retrying source fetch due to error (2/3): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying source fetch due to error (3/3): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Could not fetch specs from https://rubygems.org/
Another thing: if I go to the Rubygems website and search for the gem I want, the link is https://rubygems.org/gems/rspec/versions/3.2.0 Under versions, if I click on the version I want, shouldn't it download? I don't get a download.
Upvotes: 2
Views: 1135
Reputation: 800
Just try to run gem install rspec
and you will get the 3.3.2 version.
Upvotes: 1