Tech Tidbits - Ruby, Ruby On Rails, Merb, .Net, Javascript, jQuery, Ajax, CSS...and other random bits and pieces.

Saturday, August 23, 2008

Add and remove a remote source from gem 'remote sources''

I was attempting to add a gem and ran into an error I hadn't seen before:

Macintosh:aws-s3 dsparlingimbp$ sudo gem i aws-s3
WARNING: RubyGems 1.2+ index not found for:
http://merbivore.com

RubyGems will revert to legacy indexes degrading performance.
Updating metadata for 63 gems from http://gems.rubyforge.org/
...............................................................
complete
ERROR: could not find gem aws-s3 locally or in a repository


So I tried to update gems:

Macintosh:aws-s3 dsparlingimbp$ sudo gem update --system
Updating RubyGems
WARNING: RubyGems 1.2+ index not found for:
http://merbivore.com

RubyGems will revert to legacy indexes degrading performance.
Updating metadata for 63 gems from http://gems.rubyforge.org/
...............................................................
complete
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Not Found 404 (http://merbivore.com/Marshal.4.8)

Next I looked the gems environment:

Macintosh:rubygems-1.2.0 dsparlingimbp$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.2.0
- RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.8.5]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-8
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org", "http://merbivore.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org
- http://merbivore.com

Noticing the issues with Merb (which I recently installed), I removed http://merbivore.com from the list of remote sources:

sudo gem sources -r http://merbivore.com

I went ahead and added github while I was at it:

sudo gem sources -a http://gems.github.com

Checked my gems environment:

Macintosh:rubygems-1.2.0 dsparlingimbp$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.2.0
- RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.8.5]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-8
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org", "http://gems.github.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org
- http://gems.github.com

Everything looked good, so I tried to install aws-s3 gem again:

Macintosh:rubygems-1.2.0 dsparlingimbp$ sudo gem install aws-s3
Successfully installed aws-s3-0.5.1
1 gem installed
Installing ri documentation for aws-s3-0.5.1...
Installing RDoc documentation for aws-s3-0.5.1...

Et VoilĂ ! C'est si bon...

No comments:

About Me

My photo
Developer (Ruby on Rails, iOS), musician/composer, Buddhist, HSP, Vegan, Aspie.

Labels