Gem error to install
Solution 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.
Solution 2
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.
Solution 3
You might have proxy in your system. So use sudo http_proxy=http://host:port gem install rails.
Alexis G
Energy Quant Analyst Background: Mathematics, Quantitative IT, Economics Interests: Energy, Macroeconomics, Web and Digital, Real Estate
Updated on June 04, 2022Comments
-
Alexis G almost 2 years
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)