Oy, I just tried the definr sample and it doesn't work. Press "Go" get
nothing.
Used wireshark, confirmed it was never making the web request to definr.
So I dug around a bit. took away the thread block and it gave me an error:
"undefined constant OpenURI::OpenRead::OpenURI in open_uri.rb line 519"
That line is:
OpenURI.open(...) from within module OpenRead (described in comments as
OpenURI::OpenRead)
There is a module above called OpenURI with a method OpenURI.open so I found
it rather sad that it couldn't easily be invoked.
Tried some other approaches. I edited line 519 there to read
"::OpenURI.open(..)"
but then it just complained about "undefined constant OpenURI", drat.
When I try the same code in irb it works great.
[EMAIL PROTECTED] ~
$ irb
irb(main):001:0> require 'open-uri'
=> true
irb(main):002:0> URI("http://www.google.com/").read
=> "<html><head><meta http-equiv=\"content-type\"
content=\"text/html;.......ter></body></html>"
I'm currently running "updatedb" so I can locate my default ruby install's
open_uri.rb and see if/how it differs.
On Wed, Feb 27, 2008 at 6:32 PM, Harold Hausman <[EMAIL PROTECTED]> wrote:
> Have you seen the definr.rb sample? (It's in the distro) ... It
> succeeds at doing a bit of threaded HTTP niceness. Could be a good
> core for some of the things you suggested.
>
> Or someone could just pull EventMachine in. Man that's a killer library.
>
> Oh well, just some thoughts.
> -Harold
>