Gem::RemoteSourceException with rubygems 0.9.0 - ruby

This Perl expert likes ruby OK, but I'm having trouble with a legacy ruby environment I have to maintain.
One host I am maintaining has rubygems 0.9.0, and I can't get it to access a remote repository for an upgrade:
$ gem list --remote --source 'http://rubygems.org/'
*** REMOTE GEMS ***
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302
Apparently this old version can't follow a redirect, and doesn't tell me where it wants to redirect.
Can someone supply:
The correct source repository?
or
How to manually get a newer version of rubygems installed?

From http://rubygems.org/pages/download:
gem install rubygems-update
update_rubygems

Related

Certificate failure and Windows10 gem version 2.4.5.1

I'm new to much of this:
My problem begins at the rails new sample_app stage of the installrails.com process.
it does its thing, getting to run bundle install and errors with "Could not verify the SSL certificate for https://rubygems.org/."
I search and learn I must update certificates, as discussed here: http://guides.rubygems.org/ssl-certificate-update/
I learn at the above page that rubygems 2.4.x is broken for windows, and therefore no download exists to update my certificates.
So I try to update $ gem update --system 2.6.7 and this is what is returned:
Updating rubygems-update
ERROR: Error installing rubygems-update:
Unable to resolve dependency: user requested 'rubygems-update (= 2.6.7)'
ERROR: While executing gem ... (NoMethodError)
undefined method `version' for nil:NilClass
I keep trying to figure out how to do something so simple as uninstall my gem version 2.4.5.1 and install 2.6.7 but can't do it... my syntax?
I have also seen a workaround using these:
gem sources --remove https://rubygems.org/
gem sources -a http://rubygems.org/
But I don't understand how that helps with certificates or how it is a permanent solution! I removed the secure source, and cannot reobtain it because of the same certificate error. So now I am stuck with the http one. Thanks for your help!
Okay so I started fresh after posting the question.
I used the work around to bypass the certificate problem:
gem sources --remove https://rubygems.org/
gem sources -a http://rubygems.org/
This then allowed me to update my gem version.
gem update --system
Then I switched gem sources back:
gem sources --remove http://rubygems.org/
gem sources -a https://rubygems.org/
I ran into another problem when running rails new sample_app at the same place, bundle install. I found the fix here: Ruby on Rails cannot bundle install
my command was gem install bundler
then I was able to successfully create the sample app. Looking forward to the next problem!

Unable to install any Gems (watir-webdriver, selenium-webdriver)

I install the Ruby: Successful
ruby -v
=> ruby 1.9.3p392 (2013-02-22) [i386-mingw32]
gem -v
=> 1.8.24
gem source
=> *** CURRENT SOURCES ***
=> http://rubygems.org/
When I try to install any gem: Failed.
Worked good for me from home, but it's not working from my work place. I tried pinging the rubygems.org site, but it's not pinging. I downloaded the gems straight from the site and put it in the folder: (watir-webdriver)
C:\Ruby193\lib\ruby\gems\1.9.1\gems>
Installed gems like this: C:\Ruby193\lib\ruby\gems\1.9.1\gems>gem install watir-webdriver
Getting this error: C:\Ruby193\lib\ruby\gems\1.9.1\gems>gem install watir-webdriver
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
Are you behind a proxy? In that case see this pages for help:
http://watir.com/installation/
http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIgeminstallWatirbehindaproxyserver%3F
If you are installing on linux (which I had a similar issue on Ubuntu), you will need to follow these instructions
First, get the right zlib driver
sudo apt-get install libzlib-ruby
Second, check your sources and possibly add to them:
gem sources
gem sources -a http://gems.rubyforge.org/
gem sources -a http://rubygems.org
BTW, I had a long process of updating my various libraries on Ubuntu to enable reasonable IRB interaction (history, tab-complete, color, etc.) on Ubuntu. It took some work but was worth it to be able to use RVM.

Problem installing gems

Why do I get this error every time I type gem install gem_name?
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
gem -v = 1.0.1, ruby -v = 1.8.6
gem 1.0.1 is very old, you should update it first.
Probably
gem --update system
is also broken, so you should install a new version manually.
And this is probably the same question.

Problem with RubyGems/installing RubyOnRails on Fedora Core 7

First of all, I'm new to Ruby. Second of all, don't castrate me for running Fedora Core 7. I'm at the mercy of GoDaddy's virtual dedicated servers :P
Okay, so basically, I've been trying to get Rails installed on my server for the past day, and I'm not entirely sure what the problem is. Ruby and RubyGems are already installed, and a quick check shows their paths:
[root#ip-*** /]# which ruby
/usr/bin/ruby
[root#ip-*** /]# which gem
/usr/bin/gem
So, according to like.. 20 different sources I've found online, all I would need to do is... gem install rails
This is where I encounter my problem.
[root#ip-*** /]# gem install rails
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302
Other sources have said I need to update my RubyGems, but this error duplicates itself when I try.
[root#ip-*** /]# gem update --system
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302
Env data for RubyGems shows:
[root#ip-*** /]# gem env
RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- GEM PATH:
- /usr/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
Like I said, I'm a Ruby n00b, so any help would be appreciated. I would really like to get Rails up and running on my system. Thanks!
If you need more info, just let me know what I'm leaving out.
Try to remove the current RubyGems and reinstall the latest version (it seems that you're stuck and unable to upgrade)

Can't install gemcutter as a Ruby Gem source

I'm trying to install the thinking sphinx gem, which is on gemcutter.org
When I run the command
gem sources -a http://gemcutter.org
I get the error:
Error fetching http://gemcutter.org:
bad response Not Found 404 (http://gemcutter.org/specs.4.8)
If I change the above URL to http://gemcutter.org.specs.4.8.gz it finds a file. How do I tell rubygems to download with the .gz extension?
It looks like a temporary Gemcutter failure. It works fine to me.
Make sure you are running the latest RubyGems version and install the latest gemcutter gem.
$ gem install gemcutter --source http://gemcutter.org
With the gemcutter GEM you type gem tumble to add Gemcutter as source.
$ gem tumble
EDIT. I just noticed you are using a really outdated RubyGems version.
Update RubyGems first.
$ gem update --system
If it tells you there's nothing to update, you have a buggy version (RubyGems 1.2 selfupdate was buggy). Upgrade with the following command.
$ gem install rubygems-update
$ update_rubygems
Then add the source.
What version of Rubygems are you running (gem --version)? If less than 1.3.5, you may want to update Rubygems and try again. (gem update --system)
This is working for me with the following sources defined:
http://gems.rubyforge.org/
http://gems.github.com
as I said this is working for me:
gem install thinking-sphinx \
> --source http://gemcutter.org
If you're upgrading, you should read this:
http://freelancing-god.github.com/ts/en/upgrading.html
Successfully installed thinking-sphinx-1.3.2
Successfully installed activesupport-2.3.4
2 gems installed
Installing ri documentation for thinking-sphinx-1.3.2...
Installing ri documentation for activesupport-2.3.4...

Resources