TurnKey Linux Virtual Appliance Library

Can't install gem

Hi everyone,

I'm really new to all this ruby, gem, redmine, turnkey stuff. The problem is quite simple : I can't install any gems.

Environment : The Turnkey VM is run with virtualbox on a CentOS distro. The host machine is connected to the web through a proxy. I suspect the proxy to block the requests but I don't know how to check it. Wget requests works fine, the apt-get too but only through our cache server.

root@redmine ~# gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-04-19 patchlevel 253) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

Here is what I get when I try to install a gem : 

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

Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:779 - Could not find RubyGem sources (> 0.0.1)

Exception `Zlib::GzipFile::Error' at /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:529 - not in gzip format
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:529:in `initialize'
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:529:in `new'
/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:529:in `gunzip'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:173:in `fetch_path'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:249:in `load_specs'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:214:in `list'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:210:in `each'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:210:in `list'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:132:in `find_matching_with_errors'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:70:in `fetch_with_errors'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:108:in `find_gems_with_sources'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:205:in `find_spec_by_name_and_version'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:237:in `install'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:119:in `execute'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:116:in `each'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:116:in `execute'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command.rb:270:in `invoke'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:134:in `process_args'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:104:in `run'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run'
/usr/local/bin/gem:21

 

At first I thought I had to upgrade redmine but the upgrade itself requires gem to install stuff. 

 

Any help more than welcome.

 

J M

Found it

Found it !

The http_proxy global variable needed to be set for the installation to work. Don't understand why though...

Anyway now it works this is what matters

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)