Net::HTTP error -- getaddrinfo: nodename nor servname provid

Hi – I have an app that exists, is running on ssl, & is running happily
on Heroku.
I’ve exposed a web service on it that is called by this code:

As far as I can tell, everything is absolutely correct (although I’ve
been at this for hours, so may be missing something obvious), but I’m
still getting the following error from the last line when I try to run
it: “getaddrinfo: nodename nor servname provided, or not known”
And here is a stack trace for completeness’ sake:

Any advice anyone can offer would be very gratefully received!