European Ruby Conference

I don’t think I’ve mentioned this before, but I
may as well do so.

It pleases me to say I’ve been invited to the
European Ruby Conference in Karlsruhe, Germany,
this coming weekend.

Now: Who else on this list is going? I know that
David Alan Black will be there.

Who else? Will I finally be able to attach faces
to some of the names I know?

Cheers,
Hal

···


Hal Fulton
hal9000@hypermetrics.com

Sorry… I would like to go … but I cannot afford it.

Instead I hold a barbacue party on friday for the
Danish Ruby user group. We will be 5 ruby-addicts,
hopefully talking alot Ruby and sharing experiences.

···

On Wed, 18 Jun 2003 09:36:17 +0900, Hal E. Fulton wrote:

Now: Who else on this list is going?


Simon Strandgaard

Sorry I won’t make it; my wife’s setting up a play on an island in the
Swedish archipelago and I volounteered to help here build a platform for
200 seated persons. My back hurts already, the platform is not ready and
only a couple of days 'til première… :wink:

Hope you have a great time and post some slides and pictures afterwards.

Regards,

Robert

···

On Wed, 18 Jun 2003, Hal E. Fulton wrote:

Now: Who else on this list is going? I know that
David Alan Black will be there.

Who else? Will I finally be able to attach faces
to some of the names I know?

Hal E. Fulton wrote:

I don’t think I’ve mentioned this before, but I
may as well do so.

Interesting… as Michael wrote…

Michael Neumann wrote:

Armin, Stefan, Hal and I stay at Hotel Markgräfler Hof:

http://www.hotel-markgraefler-hof.de/

… sounds like a fixed plan.

Now: Who else on this list is going? I know that
David Alan Black will be there.

Who else? Will I finally be able to attach faces
to some of the names I know?

I will be there (and stay at the aforementioned hotel, too).

Cheers,
Hal

Cheers, and looking forward to seeing you there.

Stephan

Now: Who else on this list is going? I know that
David Alan Black will be there.

Who else? Will I finally be able to attach faces
to some of the names I know?

I’m coming, even bringing a colleague/friend with me :slight_smile:

Bye,
Kero.

“Simon Strandgaard” 0bz63fz3m1qt3001@sneakemail.com wrote in message
news:pan.2003.06.17.23.52.03.193194@sneakemail.com

···

On Wed, 18 Jun 2003 09:36:17 +0900, Hal E. Fulton wrote:

Now: Who else on this list is going?

Sorry… I would like to go … but I cannot afford it.

Instead I hold a barbacue party on friday for the
Danish Ruby user group. We will be 5 ruby-addicts,
hopefully talking alot Ruby and sharing experiences.

I’m also a bit embarrassed not participating in the European conference, but
even from Copenhagen it is a bit of a journey to Karlsruhe. I am going to
the above mentioned grill party instead :slight_smile:

Mikkel

I am trying to learn some of the functions within
Net::HTTP. My goal is to be able to access a web page
and extract the information I need from it. For
example, a search on www.amazon. com where I pass an
author name should return a list of all books written
by the author.
To learn about Net::HTTP I am trying to use the sample
program p441a.rb but it is failing and I don’t
understand the nature of the problem. When I invoke
that program, I get the following message:

p441a.rb:11: private method ‘split’ called for nil
(NoMethodError).

If I try www.amazon.com I get the same result.
Am I missing something?

PS: Here is pgm p441a.rb:

require “net/http”

begin
h = Net::HTTP.new(“www.ruby-lang.org”, 80)
resp, data = h.get("/en/index.html", nil)
rescue => err
puts "Error: #{err}"
exit
end

puts “Retrieved #{data.split.size} lines, #{data.size}
bytes”

Process as desired…

···

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Hi,

In mail “Trying to use Net::HTTP sample program from “The Ruby Way””

···

Ludwigi Beethoven aix_tech@yahoo.com wrote:

p441a.rb:11: private method ‘split’ called for nil
(NoMethodError).

begin
h = Net::HTTP.new(“www.ruby-lang.org”, 80)
resp, data = h.get("/en/index.html", nil)

What version of ruby are you using?
If it is ruby 1.8, try latest version.

Regards,
Minero Aoki

The version, ruby -v, that I am using is:

1.7.2 under MS/Windows.

···

— Minero Aoki aamine@loveruby.net wrote:

Hi,

In mail "Trying to use Net::HTTP sample program
from “The Ruby Way”"
Ludwigi Beethoven aix_tech@yahoo.com wrote:

p441a.rb:11: private method ‘split’ called for nil
(NoMethodError).

begin
h = Net::HTTP.new(“www.ruby-lang.org”, 80)
resp, data = h.get("/en/index.html", nil)

What version of ruby are you using?
If it is ruby 1.8, try latest version.

Regards,
Minero Aoki


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Hi,

In mail “Re: Trying to use Net::HTTP sample program from “The Ruby Way””

h = Net::HTTP.new(“www.ruby-lang.org”, 80)
resp, data = h.get("/en/index.html", nil)

What version of ruby are you using?
If it is ruby 1.8, try latest version.

The version, ruby -v, that I am using is:

1.7.2 under MS/Windows.

Ah, I’m sorry. “ruby 1.8” means “devlopping branch of ruby”.
1.7.x and 1.8.0 is both developping branch, you need to update
ruby.

Reason:

  • net/http is incompatible with the one included in ruby 1.6.
    Net::HTTP#get returns [HTTPResponse, String] in 1.6,
    but same method returns the single HTTPResponse object
    in 1.7.x and 1.8.

  • But for backward compatibility, HTTPResponse#to_ary is
    added. So you can use old code without modifying code.
    This modification is done in ruby 1.8, you need update
    ruby to 1.8.

Regards,
Minero Aoki

···

Ludwigi Beethoven aix_tech@yahoo.com wrote:

Thank you for your help. I will now download ruby 1.8.

···

— Minero Aoki aamine@loveruby.net wrote:

Hi,

In mail "Re: Trying to use Net::HTTP sample
program from “The Ruby Way”"
Ludwigi Beethoven aix_tech@yahoo.com wrote:

h = Net::HTTP.new(“www.ruby-lang.org”, 80)
resp, data = h.get("/en/index.html", nil)

What version of ruby are you using?
If it is ruby 1.8, try latest version.

The version, ruby -v, that I am using is:

1.7.2 under MS/Windows.

Ah, I’m sorry. “ruby 1.8” means “devlopping branch
of ruby”.
1.7.x and 1.8.0 is both developping branch, you need
to update
ruby.

Reason:

  • net/http is incompatible with the one included
    in ruby 1.6.
    Net::HTTP#get returns [HTTPResponse, String] in
    1.6,
    but same method returns the single HTTPResponse
    object
    in 1.7.x and 1.8.

  • But for backward compatibility,
    HTTPResponse#to_ary is
    added. So you can use old code without
    modifying code.
    This modification is done in ruby 1.8, you need
    update
    ruby to 1.8.

Regards,
Minero Aoki


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

I upgraded to 1.8.0 and I am still getting the same
error. I am not sure what’s going wrong with what
appears to be a simple program.
ruby -v returns: ruby 1.8.0 (2003, 05, 26)[i386-mswin32]

···

— Minero Aoki aamine@loveruby.net wrote:

Hi,

In mail "Re: Trying to use Net::HTTP sample
program from “The Ruby Way”"
Ludwigi Beethoven aix_tech@yahoo.com wrote:

h = Net::HTTP.new(“www.ruby-lang.org”, 80)
resp, data = h.get("/en/index.html", nil)

What version of ruby are you using?
If it is ruby 1.8, try latest version.

The version, ruby -v, that I am using is:

1.7.2 under MS/Windows.

Ah, I’m sorry. “ruby 1.8” means “devlopping branch
of ruby”.
1.7.x and 1.8.0 is both developping branch, you need
to update
ruby.

Reason:

  • net/http is incompatible with the one included
    in ruby 1.6.
    Net::HTTP#get returns [HTTPResponse, String] in
    1.6,
    but same method returns the single HTTPResponse
    object
    in 1.7.x and 1.8.

  • But for backward compatibility,
    HTTPResponse#to_ary is
    added. So you can use old code without
    modifying code.
    This modification is done in ruby 1.8, you need
    update
    ruby to 1.8.

Regards,
Minero Aoki


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Hi,

In mail “Re: Trying to use Net::HTTP sample program from “The Ruby Way””

I upgraded to 1.8.0 and I am still getting the same
error. I am not sure what’s going wrong with what
appears to be a simple program.
ruby -v returns: ruby 1.8.0 (2003, 05, 26)[i386-mswin32]

The modification is introduced on 2003-06-06…
OK, try attaching patch.

Regards
Minero Aoki

— http.rb 14 May 2003 03:20:16 -0000 1.83
+++ http.rb 6 Jun 2003 07:05:52 -0000 1.84
@@ -1598,10 +1598,20 @@ module Net
attr_reader :http_version
attr_reader :code
attr_reader :message

  • alias msg message
  • alias msg message # for backward compatibility

    def inspect
    "#<#{self.class} #{@code} readbody=#{@read}>"

  • end

···

Ludwigi Beethoven aix_tech@yahoo.com wrote:
+

  • For backward compatibility.

  • To allow Net::HTTP 1.1 style assignment

  • e.g.

  • response, body = Net::HTTP.get(…)

  • def to_ary

  •  warn "net/http: warning: old style assignment found at #{caller(1)[0]}" if $VERBOSE
    
  •  [self, body()]
    

    end

[snip patch]

I noticed you’re on Win, so if you can’t patch …

Edit \ruby\lib\ruby\1.8\net\http.rb
(backup first ?)

nearer the end at line 1603 you should see …

···

“Minero Aoki” aamine@loveruby.net wrote:

Ludwigi Beethoven aix_tech@yahoo.com wrote:


def inspect
  "#<#{self.class} #{@code} readbody=#{@read}>"
end

#
# response <-> exception relationship
#

def code_type

Add the new ‘to_ary’ method so that it looks like …


def inspect
  "#<#{self.class} #{@code} readbody=#{@read}>"
end

def to_ary
  [self, body()]
end

#
# response <-> exception relationship
#

def code_type

Works for me,

#-> Retrieved 20 lines, 232 bytes

daz

Thank you guys for your help. I added the to_ary to
http.rb and my pgm is now working. Now to the next step.

···

— daz dooby@d10.karoo.co.uk wrote:

“Minero Aoki” aamine@loveruby.net wrote:

Ludwigi Beethoven aix_tech@yahoo.com wrote:

[snip patch]

I noticed you’re on Win, so if you can’t patch …

Edit \ruby\lib\ruby\1.8\net\http.rb
(backup first ?)

nearer the end at line 1603 you should see …


def inspect
  "#<#{self.class} #{@code} readbody=#{@read}>"
end

#
# response <-> exception relationship
#

def code_type

Add the new ‘to_ary’ method so that it looks like


def inspect
  "#<#{self.class} #{@code} readbody=#{@read}>"
end

def to_ary
  [self, body()]
end

#
# response <-> exception relationship
#

def code_type

Works for me,

#-> Retrieved 20 lines, 232 bytes

daz


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com