Can't install gemcutter as a Ruby Gem source - ruby

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...

Related

How to upgrade rubygems

I need to upgrade gems to 1.8 i tried installing the respective debian packages but it seems its not getting upgraded
anujm#test:~$ dpkg -l |grep -i rubygem
ii rubygems 1.3.5-1ubuntu2 package management framework for Ruby libraries/applications
ii rubygems-lwes 0.8.2-1323277262 LWES rubygems
ii rubygems1.8 1.3.5-1ubuntu2 package management framework for Ruby libraries/applications
ii rubygems1.9 1.3.5-1ubuntu2 package management framework for Ruby libraries/applications
anujm#test:~$
anujm#test:~$ gem
gem gem1.8 gem1.9
anujm#test:~$ sudo gem1.8 install serve
ERROR: Error installing serve:
multi_json requires RubyGems version >= 1.3.6
anujm#test:~$
Install rubygems-update
gem install rubygems-update
update_rubygems
gem update --system
run this commands as root or use sudo.
You can update all gems by just performing:
sudo gem update
Or:
gem update `gem outdated | cut -d ' ' -f 1`
I found other answers to be inaccurate/outdated. Best is to refer to the actual documentation.
Short version: in most cases gem update --system will suffice.
You should not blindly use sudo. In fact if you're not required to do so you most likely should not use it.
You can update gem to any specific version like this,
gem update --system 'version'
gem update --system '2.3.0'
For me it sufficed to simply run
gem update
I wouldn't use the debian packages, have a look at RVM or Rbenv.
To update just one gem (and it's dependencies), do:
bundle update gem-name
But to update just the gem alone (without updating it's dependencies), do:
bundle update --source gem-name
If you're using RVM, the command below helped me a lot when upgrading from a very very old rubygems (eg 1.3.7) that defies the more current update commands mentioned in the other responses in this thread.
rvm rubygems <version>

how to update gem command in ubuntu?

my gem version is 1.3.5 and I can't install certain gems because of that.I tried to update the gem on my computer by
sudo update --system
and it gives me an error
ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian.
RubyGems can be updated using the official
Debian repositories by aptitude or apt-get.
so according to some people, the source need to be downloads and it needs to executed by ruby. i downloaded the file, did
sudo ruby setup.rb
and it gave me
RubyGems 1.8.24 installed
== 1.8.24 / 2012-04-27
1 bug fix:
Install the .pem files properly. Fixes #320
Remove OpenSSL dependency from the http code path
RubyGems installed the following executables:
/usr/bin/gem1.8
but when I hit ruby gem -v it still gives me 1.3.5 rather than the one I installed which is 1.8.
Do I need to uninstall the older version manually? or some other thing I need to do first?
RubyGems installed the following executables: /usr/bin/gem1.8
As the line says, the name of the program is gem1.8, not gem. Ergo, you need to call
gem1.8 -v
not
gem -v
Please try make a symbolic link.
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

dev_appserver.rb cannot start after rubygems update on Ubuntu 10.04

I had rubygems 1.3.5 (or 1.3.6?) installed and then made a sudo gem update after a long while again. Some gems complained they needed a newer gems version. Because sudo gem update --system is deactivated on Ubuntu I followed these steps: How can I get RubyGems 1.3.6 on Ubuntu 10.4
But now I cannot start the dev_appserver.rb anymore, it says:
=> Bundling gems
ERROR: While executing gem ... (RuntimeError)
Unknown command bundle
I also tried to do sudo gem update and sudo gem update --system again a few times but everything is up-to-date now. Here is a list of my gems: http://pastebin.com/cFaTCyF5
It's a bit of a hack around but I can't really tell what's going on properly from what you sent but I know a few people have been having problems after running gem update --system lately. Find out what version you've just installed with
gem list
Look for the update, should look something like this: rubygems-update-1.5.0
Then try rolling back your rubygems version
sudo gem uninstall rubygems-update -v 1.5.0
sudo gem install rubygems-update -v 1.4.2 <-- try a different version
gem install --system 1.3.7 worked in my case

RubyGems - my system can't seem to find any remote gems to install

Trying to install the 'less' gem. I type sudo gem install less as instructed at http://lesscss.org/, and I get the following error:
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find less (> 0) in any repository
Alright, so I figure maybe I just need to update RubyGems. Trying 'gem update --system' gets me
Updating RubyGems...
Attempting remote update of rubygems-update
ERROR: While executing gem ... (Gem::InstallError)
rubygems-update requires builder >= 0
Arrgh. Alright, then let's try 'sudo gem install builder':
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find builder (> 0) in any repository
Seems that no matter what gem I try to install, it can't be found in any repository. I check my environment, and rubyforge is listed:
RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- GEM PATH:
- /usr/local/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
Any idea what's going on? I'm on OSX 10.4, and I installed Ruby 1.8.6 before this.
I think rubygems 1.3.x requires ruby 1.8.7 so you might install that first. Then update rubygems to 1.3.7. via gem update --system
The version of rubygems bundled in osx uses gemforge as its offical source of gems - this has since been replaced with gemcutter. You should be able to do
sudo gem update --system
To upgrade to update the latest version of ruby gems, which will then use gemcutter as the sources link
That's a really old version of rubygems! How did you install this?
Is it a manual install? If so, perhaps you could try a manual upgrade the same way.
Do the following:
sudo gem update --system
to update your install of RubyGems. Then, add the Github gem repository to your sources. I suggest github because you'll find a lot of useful things there:
sudo gem sources -a http://gems.github.com

Ruby Gem package manager failing with Gem::GemNotFoundException

I haven't used Ruby for a while on my Mac. Obviously something has changed in my environment as gem is no longer working as it should.
Some info from my machine, running OSX 10.5.8:
% gem --version
0.9.0
% gem env
Rubygems Environment:
- VERSION: 0.9.0 (0.9.0)
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- GEM PATH:
- /usr/local/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
The error I'm seeing is:
% sudo gem update --system
Password:
Updating RubyGems...
Attempting remote update of rubygems-update
ERROR: While executing gem ... (RuntimeError)
rubygems-update requires builder >= 0
Or if I try to install a new gem:
% sudo gem install bossman
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find bossman (> 0) in the repository
Some people have recommended clearing out the source_cache file, but this didn't help me. Others recommended:
% gem clean
Cleaning up installed gems...
Clean Up Complete
But that also doesn't help.
Can someone please help me get gem working again? Any insight into the reasoning behind this would be helpful. I know sufficiently little about Ruby and gem to find these error messages cryptic.
EDIT
I tried Derick Bailey's suggestion, but without any luck:
% sudo gem install rubygems-update update_rubygems
Password:
ERROR: While executing gem ... (RuntimeError)
rubygems-update requires builder >= 0
your version of rubygems should support updating, but it's obviously not working. I've been seeing this a lot recently - not just on osx, either.
the "easy" answer is to either re-install your ruby runtime with an updated version of rubygems already packaged with it, or you can install an updated version of rubygems.
for complete instructions on installing rubygems, see http://docs.rubygems.org/read/chapter/3
try running this: gem install rubygems-update update_rubygems
if that doesn't work, you'll need to manually update, which can be done with these instructions: http://docs.rubygems.org/read/chapter/3#page13
Ugh, I thought I had fixed these legacy indexes so update_rubygems worked...I guess not. The main problem here is your version of RubyGems is very old, and you'll need to update. Since you can't install gems, (none are listed in the legacy index, in an effort to get you to update) the best thing to do would be to download the .tgz/.zip from http://gemcutter.org/pages/download and run sudo ruby setup.rb.

Resources