ruby - Unable to load JSON data for Cities gem in rails -
ruby - Unable to load JSON data for Cities gem in rails -
i using cities gem allowing users select city.
according documentation path json info should set using next line of code.
cities.data_path = '/path/to/cities'
i not able figure out add together , how load. i've tried adding line location of json files in app directory no luck. still error, "not able load json data".
i beginner , can see documentation not much beginner friendly.
what in rails create initializer file in config/initializers
, give proper name cities.rb
, set code in there.
ruby-on-rails ruby json gem
Comments
Post a Comment