Programming Ruby 3.2 (5th Edition): B1.0 page 185, response not OK for me

Page 185, last example

response = http.get('/book/ruby3/programming-ruby-1-9')

doesn’t work for me, the response.message is Moved Permanently.

I have no knowledge about talking to networks.

I have no output with URI.open('http://pragprog.com') on page 186, nor with https.