Comments (4)
Hi Sergio,
Are you using the 0.0.12 version? The 0.0.11 version was with a similar problem, which was corrected on 0.0.12.
Can you check with bundle show | grep city-state
and put the results here?
from city-state.
Hello,
Yes I'm using the latest version... take a look!
bundle show | grep city-state
- city-state (0.0.12)
from city-state.
I think that I fixed the bug. Can you run a bundle update
, check if it's using the 0.0.13 version (bundle show | grep city-state
) and check if the bug still exists?
What I have changed:
Although I can reproduce the bug here, I found a problem in the code that can be related with this bug:
I done this awful thing here:
@countries = @cities = @states = {}
Originally I have this code:
@countries = {}
@cities = {}
@states = {}
and I had refactored it in order to shrunk the code, but what I really should have done was:
@countries, @states, @cities = [{}, {}, {}]
Just for curiosity, @countries = @cities = @states = {}
will create aliases between these 3 variables. So if you change one of them, you change the rest of them.
> a = b = {}
> a
{}
> a[:a] = 1
> b
{:a=>1}
from city-state.
Hello,
Now is working quite good!
Take a look...
2.1.1 :008 > CS.get :bo
=> {:B=>"El Beni", :C=>"Departamento de Cochabamba", :H=>"Departamento de Chuquisaca", :L=>"Departamento de La Paz", :N=>"Departamento de Pando", :O=>"Oruro", :P=>"Departamento de Potosi", :S=>"Departamento de Santa Cruz", :T=>"Departamento de Tarija"}
2.1.1 :009 > CS.get :bo, :s
=> ["Anillo", "Aroma", "Cotoca", "Santa Cruz"]
2.1.1 :010 >
At least in my development enviroment it's great!
Thank you very much,
Ser...
from city-state.
Related Issues (20)
- Invalid data for GB HOT 1
- broken link
- NoMethodError: undefined method `present?' for :US:Symbol HOT 1
- missing city Surat
- Is there a plan to include timezone in?
- Singapore cities are missing but present in MaxMind DB HOT 2
- Typo correction "Tithari" should be changed to "Ithari" for Nepal HOT 2
- Failed to open TCP connection to geolite.maxmind.com:80 (getaddrinfo: No address associated with hostname) (SocketError) HOT 4
- Renaming a city or Delete city HOT 3
- How to access cities when tthere is no states present for a countrry.
- Permission errors on deploy
- "No such file or directory @ rb_sysopen <url>" when attempting update
- Not working with ruby 3.2 HOT 5
- Cannot list all existing cities to check if certain city exists or not right away
- Error "Did you mean? exist?" HOT 3
- Ruby with version 3.2.2 removed method exists? for class File HOT 1
- Capturing Address in MM
- Request: new gem release HOT 1
- `CS.countries` is giving `undefined method 'exists?' for File:Class` error HOT 2
- Adding a missing city is not working properly
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 city-state.