I am trying a simple get call in Rails 5.2 application as follows.
uri = URI("https://www.google.co.in") req = Net::HTTP::get(uri)
It gives following error.
1: from (irb):85:in `rescue in irb_binding' ArgumentError (Failed to open TCP connection to www.google.co.in:443 (wrong number of arguments (given 4, expected 1..3)))
Note : Same code works in Rails 3 application. What am I doing wrong here?
2.1m questions
2.1m answers
60 comments
57.0k users