eu_central_bank
eu_central_bank copied to clipboard
Uncaught exception: Net::ReadTimeout
All of a sudden, we are gettin Uncaught exception: Net::ReadTimeout, did the project go down?
Same thing here
It looks like https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml is down
Maybe there's some way to make sure this gem doesn't crash the whole site?
Until there's a better solution, you can do this
- Download latest eurofxref-daily.txt and rename extension to
.xml(can't upload XML files to GitHub) - Add it to your
/config/initializersor somewhere similar - In
money.rb, replaceconfig.default_bank.update_rateswithconfig.default_bank.update_rates(Rails.root.join('config', 'initializers', 'eurofxref-daily.xml'))
At least that'll start your project. I tried the code below in money.rb but the timeout is really long, so it doesn't work
begin
config.default_bank.update_rates
rescue
config.default_bank.update_rates(Rails.root.join('config', 'initializers', 'eurofxref-daily.xml'))
end
https://github.com/rmustafin/russian_central_bank - This also works, if you're looking for a quick fix.
The feed is not down there has been a CAPTCHA check added:
Security Check Our systems have detected unusual traffic from your computer network. This page checks to see if it is really you sending the requests and not a bot.
Please click here to verify that you are not a bot.
Any alternative sources? Don't really trust a Russian bank.. Could download https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml with curl after filling in the captcha but the eu_central_bank gem fails to do so.
try https://github.com/spk/money-open-exchange-rates