Ruby is case sensitive.

Try with TCPServer..

-Jazmin

On Thu, Sep 8, 2011 at 1:48 PM, zxcv <[email protected]> wrote:

> 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 http://rubyinstaller.org/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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
Jazmin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to