From: Tom Savage Date: 2007-06-25T16:31:53+09:00 Subject: Newbie needs help! Strange error in code Hi, I am very new to Ruby and yesterday I managed to get a simple server operating which told me the time. I tried to extend this by adding in a simple myvar = gets.chomp! and a print myvar in place of the date output. This is the whole code: test = gets.chomp! puts test require 'socket' port = (ARGV[0] || 80).to_i server = TCPServer.new('localhost', port) while (session = server.accept) puts "Request: #{session.gets}" session.print "HTTP/1.1 200/OK\r\nContent-type: text/html\r\n\r\n" session.print "

#{test}

\r\n" session.close end The problem is that I get and error when I run it which says "`gets': No such file or directory - 1400 (Errno::ENOENT)" I run the program with "ruby x.rb 1400" 1400 is the port number If anyone can help me, I will be eternally thankfully. -- Posted via http://www.ruby-forum.com/.