-1

I just installed ruby version 2.3.0p0 using the ruby installer for windows and was trying to install bundler. When I run gem install bundler I get the following error:

Could not find a valid gem 'bundler' (>=0), here is why
Unable to download data from (link removed) rubygems -Errno:ETIMEDOUT:
Failed to open TCP connection to api.rubygems.org:443 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -connect(2) for "api.rubygems.org" port 443)(https://api.rubygems.org/specs.4.8.gz)

Some research led me to try running gem install --http-proxy http://[user]:[password]@[server]:[port] which i think might work because I am behind a proxy here and a similiar solution helped me clone a git repository earlier.
But when i tried this command I got the following error:

ERROR: While executing gem ... (Gem:CommandLineError)
Please Specify at least one gem name (e.g. gem build GEMNAME)

UPDATE
So I tried that gem install --http-proxy.... command again with the gem name at the end and I am back to getting the original TCP connection error above. I am pretty sure the login information I entered is correct. I also added --source http://... instead of the https one but still am having the same problem?

3
  • My question is why am i getting the second error?
    – KatieM
    May 19, 2016 at 11:59
  • Please Specify at least one gem name Because you did not specify a gem to install. Instead, you must do gem install --http-proxy http://..... bundler
    – Tom Lord
    May 19, 2016 at 12:47
  • Thanks I just noticed that.
    – KatieM
    May 19, 2016 at 12:54

3 Answers 3

0

1st off your error is pretty telling-

ERROR: While executing gem ... (Gem:CommandLineError) Please Specify at least one gem name (e.g. gem build GEMNAME)

2nd make sure you have met the requirements for what you're trying to do http://bundler.io/ then run the code..

gem install bundler
bundle init
echo 'gem "rspec"' >> Gemfile
bundle install
bundle exec rspec
0

In 2023, the best way to install bundler on an old version of Ruby is:

gem update --system

RubyGems and Bundler now ship together, so to get the latest bundler, you should just install the latest RubyGems.

-1

would you try disable ipv6, it had been worked for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.