Gem error to install

Go To StackoverFlow.com

4

I try to install rails but I am faced to the following error.

Has somebody any idea how to resolve it ?

C:\Users\Utilisateur>gem -v
2.0.14

C:\Users\Utilisateur>gem install rails
ERROR:  Could not find a valid gem 'rails' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - no such name (htt
ps://rubygems.org/latest_specs.4.8.gz)

C:\Users\Utilisateur>gem install rails --source http://rubygems.org
ERROR:  Could not find a valid gem 'rails' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - no such name (htt
ps://rubygems.org/latest_specs.4.8.gz)
          Unable to download data from http://rubygems.org/ - no such name (http
://rubygems.org/latest_specs.4.8.gz)
2014-04-12 20:50
by Alexis G


1

I had the same issue but I ran the "Start command prompt with Ruby" as an administrator and tried the gem install rails and it worked.

2014-08-12 19:00
by Andrei Rînea


13

First try to update ruby gems.

gem update --system

The issue most likely is with your internet connection.

If you see this issue again, try

gem install rails --source http://rubygems.org

You can add the not https source permanently like this

gem sources -a http://rubygems.org
Do you want to add this insecure source? [yn]y

I want to give you one more tip:

Don't develop rails on windows. Ruby and rails and many gems are very UNIXy in their ways. Install virtualbox and ubuntu on a virtual machine and run you development for there.

2014-04-12 21:03
by Andreas Lyngstad
Same problem see my new post. Any other idea ? I try since more than 1 hour by installing, uninstalling, ... I haven't got openssl.. - Alexis G 2014-04-12 21:13
try this gem update --systemAndreas Lyngstad 2014-04-12 21:16
Result is => Latest version currently installed. Aborting. No change for the previous comman - Alexis G 2014-04-12 21:19
thats strange cause the last version is 2.2.2. Look at the rubygems download page and see if you can find a way to update i - Andreas Lyngstad 2014-04-12 21:22
I will try to change the version and come back to tell if it works - Alexis G 2014-04-12 21:26
Great! Please delete your answer below - Andreas Lyngstad 2014-04-12 21:30
Still a pb with 1.8.24 version : See C:\Users\Utilisateur>gem install rails --source http://rubygems.org ERROR: Could not find a valid gem 'rails' (>= 0) in any repository ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: getaddrinfo: Les blocs de contr¶le de mÚmoire ont ÚtÚ dÚtruits. (http://rubygems.org/latest_specs.4.8.gz - Alexis G 2014-04-12 21:58
It might be a proxy problem. Look here for solution. The real answer to all you problems is; stop using windows. It will take you about one hour to set up ubuntu on a vboxAndreas Lyngstad 2014-04-12 22:10
No solution founded! I switched on Ma - Alexis G 2014-04-13 17:24
That's a good decision. I suggested vbox cause its free. Good luck - Andreas Lyngstad 2014-04-13 19:01
how about the ruby developers pull that "cross platform" lie from the site then - Andrei Rînea 2014-08-12 18:55
Thanks a lot dude .. issue solved when using http instead of https. gem install rails --source http://rubygems.or - Karthik 2018-01-18 05:28


3

You might have proxy in your system. So use sudo http_proxy=http://host:port gem install rails.

2015-05-11 04:30
by theBuzzyCoder


0

I had to run 'gem install' as root to get this to work. I.e. 'sudo', which is less than ideal.

I suspect 'gem' has very poor error reporting and doesn't communicate the real cause from a permissions issue deep down the stack.

2015-01-15 01:39
by Alex Worden


-3

My problem was I had configured a proxy in my network connection as @theBuzzyCoder said, so I simply changed my connection and it worked, I could install my gem (sass in my case)

2018-10-31 10:51
by amartinledesma
Ads