Problems with rubygems on Ubuntu Karmic

Mike Burke's Avatar

Mike Burke

08 Sep, 2010 11:00 PM

I have installed rubygems from the tar file on the rubygems project page.

I test it by:

root@bostrom:~# gem list

LOCAL GEMS

When I try to install anything:

root@bostrom:~# gem install gemcutter
ERROR: While executing gem ... (URI::InvalidURIError)
bad URI(is not URI?): http://localhost:4001

Woops! Now I try:

root@bostrom:~# gem --debug install gemcutter
Exception NameError' at /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:164 - uninitialized constant Gem::Commands::InstallCommand ExceptionNoMethodError' at /usr/lib/ruby/1.8/rational.rb:78 - undefined method gcd' for Rational(1, 2):Rational ExceptionGem::LoadError' at /usr/local/lib/site_ruby/1.8/rubygems.rb:779 - Could not find RubyGem test-unit (>= 0)

Exception URI::InvalidURIError' at /usr/lib/ruby/1.8/uri/common.rb:436 - bad URI(is not URI?): http://localhost:4001 ERROR: While executing gem ... (URI::InvalidURIError) bad URI(is not URI?): http://localhost:4001 /usr/lib/ruby/1.8/uri/common.rb:436:insplit' /usr/lib/ruby/1.8/uri/common.rb:485:in parse' /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:210:inget_proxy_from_env' /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:66:in initialize' /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:44:innew' /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:44:in fetcher' /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:53:ininitialize' /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:38:in new' /usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:38:infetcher' /usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:108:in find_gems_with_sources' /usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:205:infind_spec_by_name_and_version' /usr/local/lib/site_ruby/1.8/rubygems/dependency_installer.rb:237:in install' /usr/local/lib/site_ruby/1.8/rubygems/commands/install_command.rb:119:inexecute' /usr/local/lib/site_ruby/1.8/rubygems/commands/install_command.rb:116:in each' /usr/local/lib/site_ruby/1.8/rubygems/commands/install_command.rb:116:inexecute' /usr/local/lib/site_ruby/1.8/rubygems/command.rb:270:in invoke' /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:134:inprocess_args' /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:104:in run' /usr/local/lib/site_ruby/1.8/rubygems/gem_runner.rb:58:inrun' /usr/bin/gem:21

I think I am dealing with two problems here. I think I need more info on configuring rubygems, but I don't know where to look. I also don't understand why rubygems is looking for port 4001 (which is not open in my /etc/services file).

I am simply trying to install Jekyll on Ubuntu Karmic 9.10, but I would like RoR and RMagick to work also.

Can anyone help?

Thank you very much,

Mike

  1. 1 Posted by Mike Burke on 08 Sep, 2010 11:04 PM

    Mike Burke's Avatar

    Whoa! That is the strangest looking post I've ever seen. I copied and pasted from my terminal to the message box.

    Perhaps someone could suggest a setting for the forum so that I can make it more readable in the future.

    Thanks,

    Mike

  2. Support Staff 2 Posted by Eric Hodel on 09 Sep, 2010 12:16 AM

    Eric Hodel's Avatar

    It appears that you have RubyGems configured to use a proxy server at localhost port 4001.

    gem help env explains how RubyGems finds proxy servers in your environment.

  3. 3 Posted by Mike Burke on 09 Sep, 2010 01:31 AM

    Mike Burke's Avatar

    You rock!

    I had installed anon-proxy and forgot about it. I had an environment variable in my profile and so ... gem now works.

    Thanks,

    Mike

  4. Eric Hodel closed this discussion on 09 Sep, 2010 01:44 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac