Hi. First post in this group and I hope someone can help.
I am trying to teach myself Ruby with a long-term goal of doing some web development using Ruby on Rails.
Note: version C:\rails\hello>ruby -v ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
I have been going through Jeremy McAnally's book "Mr. Neighborly’s Humble Little Ruby Book" and there is a section in chapter 5 where he explains how to connect a socket using the lines:
require "socket" myserver = TCPserver.new('localhost', 0)
When I try this I get the error:
C:\rails\hello>ruby server.rb server.rb:2:in `<main>': uninitialized constant Object::TCPserver (NameError)
So I look in the socket.rb file and sure enough there is no TCPserver class although all of the documentation I find online says there should be. I even went to Downloads to get ruby and install again and still no luck.
Is this a deprecated class? Is there some other way to make a socket connection? Is there somewhere that I can get the version of socket that contains this class?
Thank you.