Gems install failing


#1

We are trying to install ruby and rubygems on a RedHat AS 3 server. It
is behind a firewall and uses a proxy.

The rubygems Setup.rb is failing.

Thanks in advance for any help.

here is the output.(curl works fine with the proxy setting)

[root@nirvana rubygems-0.9.2]# echo $HTTP_PROXY
http://172.22.96.15:80
[root@nirvana rubygems-0.9.2]# ruby setup.rb
—> bin
<— bin
—> lib
—> lib/rbconfig
<— lib/rbconfig
—> lib/rubygems
<— lib/rubygems
<— lib
—> bin
<— bin
—> lib
—> lib/rbconfig
<— lib/rbconfig
—> lib/rubygems
<— lib/rubygems
<— lib
rm -f InstalledFiles
—> bin
mkdir -p /usr/bin/
install gem /usr/bin/
install gem_mirror /usr/bin/
install gem_server /usr/bin/
install gemlock /usr/bin/
install gemri /usr/bin/
install gemwhich /usr/bin/
install index_gem_repository.rb /usr/bin/
install update_rubygems /usr/bin/
<— bin
—> lib
mkdir -p /usr/lib/site_ruby/1.6/
install gemconfigure.rb /usr/lib/site_ruby/1.6/
install rubygems.rb /usr/lib/site_ruby/1.6/
install ubygems.rb /usr/lib/site_ruby/1.6/
—> lib/rbconfig
mkdir -p /usr/lib/site_ruby/1.6/rbconfig
install datadir.rb /usr/lib/site_ruby/1.6/rbconfig
<— lib/rbconfig
—> lib/rubygems
mkdir -p /usr/lib/site_ruby/1.6/rubygems
install builder.rb /usr/lib/site_ruby/1.6/rubygems
install cmd_manager.rb /usr/lib/site_ruby/1.6/rubygems
install command.rb /usr/lib/site_ruby/1.6/rubygems
install config_file.rb /usr/lib/site_ruby/1.6/rubygems
install custom_require.rb /usr/lib/site_ruby/1.6/rubygems
install dependency_list.rb /usr/lib/site_ruby/1.6/rubygems
install doc_manager.rb /usr/lib/site_ruby/1.6/rubygems
install format.rb /usr/lib/site_ruby/1.6/rubygems
install gem_commands.rb /usr/lib/site_ruby/1.6/rubygems
install gem_open_uri.rb /usr/lib/site_ruby/1.6/rubygems
install gem_openssl.rb /usr/lib/site_ruby/1.6/rubygems
install gem_runner.rb /usr/lib/site_ruby/1.6/rubygems
install installer.rb /usr/lib/site_ruby/1.6/rubygems
install old_format.rb /usr/lib/site_ruby/1.6/rubygems
install open-uri.rb /usr/lib/site_ruby/1.6/rubygems
install package.rb /usr/lib/site_ruby/1.6/rubygems
install remote_fetcher.rb /usr/lib/site_ruby/1.6/rubygems
install remote_installer.rb /usr/lib/site_ruby/1.6/rubygems
install rubygems_version.rb /usr/lib/site_ruby/1.6/rubygems
install security.rb /usr/lib/site_ruby/1.6/rubygems
install server.rb /usr/lib/site_ruby/1.6/rubygems
install source_index.rb /usr/lib/site_ruby/1.6/rubygems
install source_info_cache.rb /usr/lib/site_ruby/1.6/rubygems
install source_info_cache_entry.rb /usr/lib/site_ruby/1.6/rubygems
install specification.rb /usr/lib/site_ruby/1.6/rubygems
install timer.rb /usr/lib/site_ruby/1.6/rubygems
install user_interaction.rb /usr/lib/site_ruby/1.6/rubygems
install validator.rb /usr/lib/site_ruby/1.6/rubygems
install version.rb /usr/lib/site_ruby/1.6/rubygems
<— lib/rubygems
<— lib
/usr/lib/site_ruby/1.6/rubygems/source_index.rb:8:in require': /usr/lib/site_ruby/1.6/rubygems/remote_fetcher.rb:12: syntax error (SyntaxError) class Gem::RemoteSourceException < Gem::Exception; end ^ /usr/lib/site_ruby/1.6/rubygems/remote_fetcher.rb:18: syntax error class Gem::RemoteFetcher ^ /usr/lib/site_ruby/1.6/rubygems/remote_fetcher.rb:26: syntax error @fetcher ||= new Gem.configuration[:http_proxy] ^ from /usr/lib/site_ruby/1.6/rubygems/source_index.rb:8 from /usr/lib/site_ruby/1.6/rubygems.rb:501:inrequire’
from /usr/lib/site_ruby/1.6/rubygems.rb:501
from /root/rubygems-0.9.2/./post-install.rb:81:in require' from /root/rubygems-0.9.2/./post-install.rb:81:ininstall_sources’
from /root/rubygems-0.9.2/./post-install.rb:116:in
instance_eval' from setup.rb:590:ininstance_eval’
from setup.rb:590:in try_run_hook' from setup.rb:584:inrun_hook’
from setup.rb:1322:in exec_task_traverse' from setup.rb:1175:inexec_install’
from setup.rb:894:in exec_install' from setup.rb:712:ininvoke’
from setup.rb:681:in `invoke’
from setup.rb:1359


#2

On Tue, 17 Apr 2007, Bob C. wrote:

We are trying to install ruby and rubygems on a RedHat AS 3 server. It
is behind a firewall and uses a proxy.

The rubygems Setup.rb is failing.

Thanks in advance for any help.

/usr/lib/site_ruby/1.6/rubygems/source_index.rb:8:in `require’:
/usr/lib/site_ruby/1.6/rubygems/remote_fetcher.rb:12: syntax error
(SyntaxError)
class Gem::RemoteSourceException < Gem::Exception; end
^

you are using an ancient ruby. probably ruby 1.6.8 (several years old).

redhat bites in this respect.

you’ll want to install 1.8.5 iff possible.

regards.

-a