3
votes

I downloaded Ruby 2.0.0 and have gem version 2.0.14. I need at least gem version 2.0.3 to meet the requirements to run my script. However, when I try to update:

gem update --system

I get a message that says "Latest version currently installed, Aborting." What do I need to do to get this to update properly? As a result of this, I can't install the gems that I need. For example:

gem install watir

returns

ERROR: could not find a valid gem 'watir' ()= 0), here is why: Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/latest_specs.4.8.gz).  

Could this be a proxy issue, or is it something entirely different?

EDIT gem env:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.14
  - RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/Users/shwheelz/Documents/Ruby200/lib/ruby/gems/2.
0.0
  - RUBY EXECUTABLE: C:/Users/shwheelz/Documents/Ruby200/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Users/shwheelz/Documents/Ruby200/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/Users/shwheelz/Documents/Ruby200/lib/ruby/gems/2.0.0
     - C:/Users/shwheelz/.gem/ruby/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/ 
2
Which operation system & exact Ruby version are you using (like 2.0.0-p481) + are you using any Ruby package manager like RVM or rbenv?ekremkaraca
Ruby 2.0.0p481 <2014-05-08> [i386-mingw32], no package managerShwheelz
Could you post output of gem env? It's better to be attached in the question.ekremkaraca
As @ekremkrc says, we need to see the output of gem env. Copy it, edit your question, and paste that information in. Be sure to indent it four spaces, or mark it with <pre> tags so it maintains its format.the Tin Man

2 Answers

1
votes

I have encountered the same problem. Because I was gem source deleted. Type

gem sources -l

See if there is one gem source, if not, run following

gem sources --add https://rubygems.org/

To remove a source

gem sources --remove https://rubygems.org/

then try again.

0
votes

Try to run

gem install rubygems-update
update_rubygems