google_currency icon indicating copy to clipboard operation
google_currency copied to clipboard

Service moved error

Open rebelvc opened this issue 9 years ago • 4 comments

irb(main):025:0> uri = URI 'https://www.google.com/finance/converter?a=1&from=USD&to=BRL' => #<URI::HTTPS:0x000000057154f8 URL:https://www.google.com/finance/converter?a=1&from=USD&to=BRL> irb(main):026:0> Net::HTTP.get(uri) => "<meta http-equiv="content-type" content="text/html;charset=utf-8">\n302 Moved\n

302 Moved

\nThe document has moved\n<A HREF="https://finance.google.com/finance/converter">here.\r\n\r\n"

rebelvc avatar Sep 12 '17 20:09 rebelvc

can we bump the gem version to include https://github.com/RubyMoney/google_currency/commit/fa6e8ba366c0b63f8583e7ec7675f47d8ee7c410

xinranxiao avatar Sep 13 '17 16:09 xinranxiao

Is it possible to get a version bump soon? :)

gonace avatar Sep 14 '17 06:09 gonace

Hack until version is bumped is to add this somewhere in your app code, e.g. at the bottom of config/initializers/money.rb

Money::Bank::GoogleCurrency::SERVICE_HOST="finance.google.com"

timrwilliams avatar Sep 14 '17 08:09 timrwilliams

#56 solves this. I've also just pushed an update — https://rubygems.org/gems/google_currency

antstorm avatar Sep 14 '17 09:09 antstorm