Comments (5)
I've got $100 for anyone who can replicate it and show a solution (not just a workaround).
from currencies.
Here's the smallest bit of code that will produce the inconsistent results. It only does it on my production server, not on my development machine (not even in production mode).
rails@li354-33:/srv/tinefcon-orders/current$ ./script/console production Loading production environment (Rails 2.3.8) >> ["AUD", "CAD", "EUR", "HKD", "PLN", "RUB", "ZAR", "GBP", "USD"].map {|c| ISO4217::Currency.from_code(c).exchange_rate } => [1.0, 0.6493, 0.8819, 0.0787, 0.2209, 0.0221, 1.0, 1.0, 505571776.0] >> ["AUD", "CAD", "EUR", "HKD", "PLN", "RUB", "ZAR", "GBP", "USD"].map {|c| ISO4217::Currency.from_code(c).exchange_rate } => [1.0, 0.6493, 0.8819, 0.0787, 0.2209, 0.0221, 1.0, 1.0, 505571776.0] >> exit rails@li354-33:/srv/tinefcon-orders/current$ ./script/console production Loading production environment (Rails 2.3.8) >> ["AUD", "CAD", "EUR", "HKD", "PLN", "RUB", "ZAR", "GBP", "USD"].map {|c| ISO4217::Currency.from_code(c).exchange_rate } => [0.665, 0.6493, 0.8819, 0.0787, 1.0, 0.0221, 0.0906, 1.0, 0.6135] >> exit
from currencies.
Mystery solved. It's actually coming from Yahoo that way.
?> ["AUD", "CAD", "EUR", "HKD", "PLN", "RUB", "ZAR", "GBP", "USD"].each {|c| puts get_yahoo_response(c) } "AUDGBP=X",1.00,"N/A","N/A" "CADGBP=X",0.6494,"7/21/2011","12:59pm" "EURGBP=X",0.8821,"7/21/2011","12:59pm" "HKDGBP=X",0.0787,"7/21/2011","12:59pm" "PLNGBP=X",1.00,"N/A","N/A" "RUBGBP=X",1.00,"N/A","N/A" "ZARGBP=X",1.00,"N/A","N/A" "GBPGBP=X",1.00,"N/A","N/A" "USDGBP=X",0.6134,"7/21/2011","12:59pm"
Now to figure out why.
from currencies.
I'm going to use https://github.com/RubyMoney/eu_central_bank instead. So long and thanks for all the fish.
from currencies.
Sorry for the slow response, I have been planning my wedding and very swamped. I will take a look at Yahoo and see if they changed something or are just mucking it up.
from currencies.
Related Issues (10)
- Money Gem exchange bank needs updated
- Ruby 1.9 and 2: LoadError: cannot load such file -- YAML HOT 1
- full_name attr_reader commit not released as gem? HOT 1
- Publish v0.4.3 on rubygems.org HOT 2
- Money class is defined if currencies is loaded without money HOT 2
- Is this project still being maintained?
- "0.0" exchange rate - 403 forbidden
- Release new version v0.4.4
- Typical precision should be stored as well
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from currencies.