Forum: Ruby Gems install failing

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ec095272f51fe02ed359648a8c649070?d=identicon&s=25 Bob Cober (Guest)
on 2007-04-16 23:20
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:in `require'
        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:in
`install_sources'
        from /root/rubygems-0.9.2/./post-install.rb:116:in
`instance_eval'
        from setup.rb:590:in `instance_eval'
        from setup.rb:590:in `try_run_hook'
        from setup.rb:584:in `run_hook'
        from setup.rb:1322:in `exec_task_traverse'
        from setup.rb:1175:in `exec_install'
        from setup.rb:894:in `exec_install'
        from setup.rb:712:in `invoke'
        from setup.rb:681:in `invoke'
        from setup.rb:1359
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 unknown (Guest)
on 2007-04-16 23:59
(Received via mailing list)
On Tue, 17 Apr 2007, Bob Cober 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.

<snip>

> /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
This topic is locked and can not be replied to.