yahoo-finance
yahoo-finance copied to clipboard
SocketError: Failed to open TCP connection to download.finance.yahoo.com:443
Steps to reproduce
- Add
gem 'yahoo-finance'
to Gemfile -
bundle install
-
rails c
- execute this...
yahoo_client = YahooFinance::Client.new
data = yahoo_client.quotes(["BVSP", "NATU3.SA", "USDJPY=X"], [:ask, :bid, :last_trade_date])
The result...
SocketError: Failed to open TCP connection to download.finance.yahoo.com:443 (getaddrinfo: nodename nor servname provided, or not known)
from /Users/victorcosta/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/net/http.rb:939:in `rescue in block in connect'
Caused by SocketError: getaddrinfo: nodename nor servname provided, or not known
from /Users/victorcosta/.rvm/rubies/ruby-2.5.5/lib/ruby/2.5.0/net/http.rb:937:in `initialize'