Installing Rails problem

I have installed Ruby and Apache, but when tried to install Rails (sudo
gem install rails --include-dependencies) I have got an error:

INFO: gem install -y is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
ERROR: While executing gem … (URI::InvalidURIError)
the scheme http does not accept registry part: :8080 (or bad
hostname?)

I tried also gem --debug install rails -r

and it wrote:
Exception NameError' at /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:161 - uninitialized constant Gem::Commands::InstallCommand ExceptionGem::LoadError’ at
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:827 - Could not find
RubyGem test-unit (>= 0)

Exception URI::InvalidURIError' at /usr/local/lib/ruby/1.9.1/uri/generic.rb:199 - the scheme http does not accept registry part: :8080 (or bad hostname?) ERROR: While executing gem ... (URI::InvalidURIError) the scheme http does not accept registry part: :8080 (or bad hostname?) /usr/local/lib/ruby/1.9.1/uri/generic.rb:199:ininitialize’
/usr/local/lib/ruby/1.9.1/uri/http.rb:78:in initialize' /usr/local/lib/ruby/1.9.1/uri/common.rb:177:innew’
/usr/local/lib/ruby/1.9.1/uri/common.rb:177:in parse' /usr/local/lib/ruby/1.9.1/uri/common.rb:626:inparse’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:202:in
get_proxy_from_env' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:66:ininitialize’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:44:in
new' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:44:infetcher’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:52:in
initialize' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:37:innew’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:37:in
fetcher' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:99:infind_gems_with_sources’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:192:in
find_spec_by_name_and_version' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:213:ininstall’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:118:in
block in execute' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:115:ineach’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:115:in
execute' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:257:ininvoke’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:132:in
process_args' /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:102:inrun’
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:58:in run' /usr/local/bin/gem:21:in

However I do not know how to move ahead. Could someone help me please?

Thamk you

I forgot, the system is portable Ubuntu (Pubuntu) 8.04

Hi
Hva you tried

sudo gem install rails

Sijo