Where is the issue?

require "socket"

client = TCPSocket.new("127.0.0.1:", 80)

puts client

result:

Unhandled exception: Hostname lookup for 127.0.0.1: failed: No such host is known. (Socket::Addrinfo::Error)
  from C:\Users\unknown\scoop\apps\crystal\1.9.2\src\socket\addrinfo.cr:132 in 'initialize'
  from C:\Users\unknown\scoop\apps\crystal\1.9.2\src\socket\tcp_socket.cr:29 in 'initialize'
  from C:\Users\unknown\scoop\apps\crystal\1.9.2\src\socket\tcp_socket.cr:29 in 'new'
  from project.cr:4 in '__crystal_main'
  from C:\Users\unknown\scoop\apps\crystal\1.9.2\src\crystal\main.cr:129 in 'main_user_code'
  from C:\Users\unknown\scoop\apps\crystal\1.9.2\src\crystal\main.cr:115 in 'main'
  from C:\Users\unknown\scoop\apps\crystal\1.9.2\src\crystal\main.cr:141 in 'main'
  from C:\Users\unknown\scoop\apps\crystal\1.9.2\src\crystal\system\win32\wmain.cr:37 in 'wmain'
  from D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 in '__scrt_common_main_seh'
  from C:\Windows\System32\KERNEL32.DLL +95764 in 'BaseThreadInitThunk'
  from C:\Windows\SYSTEM32\ntdll.dll +337569 in 'RtlUserThreadStart'

You seem to have a : in your host string which is making it invalid?

that’s not the issue i tried removing it and the same message and error

Are you sure? When I run your code as is I get Hostname lookup for 127.0.0.1: failed: No address found, but if I remove the : I get Error connecting to '127.0.0.1:80': Connection refused. Which is a different error and somewhat expected since there’s nothing for it to connect to.

wait now it is working maybe the changes took time to apply