One that caught me out for a while … needed to reduce the timeout the Net/HTTP library was defaulting to because the servers I was querying were liable to be offline and I didn’t want my script hanging around. I wrote something like: require ‘net/http’ res = Net::HTTP.start(‘http://www.example.com’) do |http| http.open_timeout = 4 http.read_timeout = [...]
© Chillibear | Theme DePo Skinny | Header image from: Andrews, William: 'Curiosities of the Church: Studies of Curious Customs, Services and Records' (1891)