views:

5019

answers:

3

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?

A: 

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...
ennuikiller
I've already got those as sources, but gem can't find thinking-sphinx on either.
Mike Sutton
please specify the command you are using to install the gem
ennuikiller
-1 for what? saying that it works for me?
ennuikiller
The question was about adding a source to the list of default sources, not installing with an explicitly specified source.
Avdi
The gem --source ... line reports 'ERROR: could not find gem thinking-sphinx locally or in a repository'
Mike Sutton
+1  A: 

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)

Avdi
Current version 1.2.0. The update command reports 'Nothing to update'
Mike Sutton
+8  A: 

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.

Simone Carletti
The first command reports 'ERROR: could not find gem gemcutter locally or in a repository'
Mike Sutton
Upgrade RubyGems. I just read you are using a really outdated version.I just updated my answer.
Simone Carletti
Okay, I've installed rubygems-update 1.3.5. The update_rubygems command failed (command not found), but I found the file manually and ran it 'ruby rubygems_update --version=1.2.0' which gave loads of output but gem --version is still reporting 1.2.0.
Mike Sutton
Bingo. I downloaded the update manually, then ran the setup.rb installer.
Mike Sutton
@Simone Carletti: your answer solved my troubles too.Thank you.
Radek
Just an FYI... `gem tumble` or the --source flag isn't necessary anymore, since Gemcutter is the default repository.
qrush