Reputation: 43636
Trying to solve this issue I have a solution telling that using the proxy option when installing gem will help.
I am executing the following line:
sudo gem install rails --http-proxy=http://rubygems.org/
but it give me the same error:
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
ERROR: Possible alternatives: rails
Could anyone tell what I am doing wrong?
Upvotes: 1
Views: 453
Reputation: 46
The HTTP proxy isn't rubygems... if you espesify a proxy so... you have to put your own proxy... if you have not proxy... so don't put http-proxy... =)
Do first REALLY_GEM_UPDATE_SYSTEM=1 sudo gem update --system
sudo gem install rails
Upvotes: 3
Reputation: 1449
In both question -also question from - Ruby is installed by package managers like Synaptic, Aptitude. Debian-like operating systems stricts installation of gems without using package manager. You may use REALLY_GEM_UPDATE_SYSTEM with installation of gems like, but not recommended:
gem install rails REALLY_GEM_UPDATE_SYSTEM=true
Instead of that, you should prefer using RVM or rbenv to get rid of package manager based installation
Upvotes: 1