RubyMoney / google_currency

Ruby Money::Bank interface for the Google Currency exchange data
http://rubymoney.github.com/google_currency
MIT License
182 stars 90 forks source link

Service moved error #57

Closed rebelvc closed 7 years ago

rebelvc commented 7 years ago

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"

xinranxiao commented 7 years ago

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

gonace commented 7 years ago

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

timrwilliams commented 7 years ago

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"

antstorm commented 7 years ago

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