Gem Update System - Catch 22 with 302 Redirects

If I try to install any gem on my server, then I get a 302 redirect, for example.

gem install clickatell -V GET http://rubygems.org/latest_specs.4.8.gz 302 Found HEAD http://rubygems.org/specs.4.8.gz connection reset after 2 requests, retrying HEAD http://rubygems.org/specs.4.8.gz 302 Found 

An article on rubygems suggests updating gem - system

http://help.rubygems.org/kb/rubygems/why-do-i-get-http-response-302-or-301-when-installing-a-gem

 gem update --system -V Updating RubyGems GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz connection reset after 2 requests, retrying HEAD 302 Found: http://gems.rubyforge.org/specs.4.8.gz connection reset after 2 requests, retrying HEAD 302 Found: http://gems.rubyforge.org/yaml ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::ETIMEDOUT: Connection timed out - connect(2) (http://gems.rubyforge.org/yaml) 

which is, of course, just an update of the gem itself.

I am running rubygems 1.3.1. The latest version is 1.6.1.

Is there a way to update Rubygems without falling into the 302 redirect trap.

Hello,

Kevin.

+4
source share
3 answers

I was able to update rubygems with

 gem update --system -l -V --source http://production.cf.rubygems.org Updating RubyGems GET http://production.cf.rubygems.org/latest_specs.4.8.gz 200 OK Updating rubygems-update Installing gem rubygems-update-1.6.1 Using local gem /home/passenger/.rvm/gems/ruby-1.8.7-p249/cache/rubygems-update-1.6.1.gem 

This did not solve the 302 errors that I get on any other stone.

To set gems directly, you can follow these steps:

 1. go to http://rubygems.org/, search for 'your-gem', and copy the link 2. wget http://rubygems.org/downloads/your-gem.gem 3. gem install ./your-gem.gem --local 
+5
source

Just install the latest version of rubygems from the source code (1.8.17 is the most relevant right now):

  wget http://http://production.cf.rubygems.org/rubygems/rubygems-1.8.17.tgz tar -xzvf rubygems-1.8.17.tgz cd rubygems-1.8.17.tgz sudo ruby setup.rb 

Must work:)

0
source

Follow the instructions from rubygems.org:

http://rubygems.org/pages/download

I found there a manual installation that helps me get the last gem (RubyGems)

0
source

Source: https://habr.com/ru/post/1343158/


All Articles