Errors in Ruby appear because?

0

Goal Add (uri, url) with port.

 # Ajuda por carlos-romero   
 # https://stackoverflow.com

 # Ajuda por mu-is-too-short
 # https://stackoverflow.com

require 'uri'
require 'socket'

url = 'file://C://'

 class Class1
    def fileProtocol( url )
        uri = URI(url) if scheme = uri.scheme
      puts fileProtocol(url)
    end
  end

 class Class2
     def fileProtocolPort( server )
         server = TCPServer.open(8080)
           for i in  0..5
           client = server.accept
             client.puts(Time.now.ctime)
            client.puts "Closing the connection. Bye!"
            client.close
            end
            end
            end

ruby shows these errors

  

Traceback (most recent call last):       2: from main.rb: 7: in <main>' 1: from main.rb:7:in open '   main.rb: 7: in 'initialize': Address already in use - bind (2) for nil port 8080 (Errno :: EADDRINUSE)

So, what does this mean? Can you help me?

    
asked by anonymous 21.11.2018 / 21:43

0 answers