1

I am facing the following error while installing the gems on windows machine.

They were couple of similar questions on the stack overflow,but that didn't help.

My system Configurations

Windows:7
Ruby:2.2

Error:ERROR:  Could not find a valid gem 'watir' (>= 0) in any repository
shaik
  • 143
  • 11
  • Do you have something like this: `gem "watir", "~>4.0"` in your `Gemfile`? – K M Rakibul Islam Sep 29 '15 at 17:05
  • @ K M Rakibul Islam gem 'watir', '5.0.0', these is the gem of version I have – shaik Sep 29 '15 at 17:06
  • I see, you can check this out and try those sugestions if that works for you: http://stackoverflow.com/questions/3172108/how-to-update-watir – K M Rakibul Islam Sep 29 '15 at 17:13
  • may be you are having internet issues – Zahid Sep 29 '15 at 17:13
  • @ K M Rakibul Islam I have tried that it didn't work – shaik Sep 29 '15 at 17:14
  • @ Zahid 51 lol..........its fine no issue at all – shaik Sep 29 '15 at 17:14
  • @ K M Rakibul Islam ERROR: Could not find a valid gem 'watir' (>= 0), here is why: Unable to download data from http://gems.github.com/ - Errno::ECONNREF USED: No connection could be made because the target machine actively refused it . - connect(2) for "gems.github.com" port 80 (http://gems.github.com/specs.4.8.g z) when I tried with the link specifed I got the above error – khan Sep 29 '15 at 17:15
  • whats the output of this: `gem sources` – K M Rakibul Islam Sep 29 '15 at 17:16
  • try doing: `gem sources --add http://rubygems.org/` – K M Rakibul Islam Sep 29 '15 at 17:16
  • I got these error with the above command Do you want to add this insecure source? [yn] y Error fetching http://rubygems.org/: Errno::ECONNREFUSED: No connection could be made because the target mach ine actively refused it. - connect(2) for "api.rubygems.org" port 80 (http://api .rubygems.org/specs.4.8.gz) – khan Sep 29 '15 at 17:17

1 Answers1

0

From your comments it looks like you're missing the rubygems registry from your Gemfile sources (which is likely where you want to get watir from). Add this in at the top of your Gemfile source 'https://rubygems.org'

photoionized
  • 5,092
  • 20
  • 23