jimmyz / familysearch-rb

A Ruby Gem for the FamilySearch Platform.
MIT License
11 stars 8 forks source link

NoMethodError when getting current user person (as in usage example) #5

Closed xtagon closed 10 years ago

xtagon commented 10 years ago

Hi,

I am getting the following error while attempting to get a person resource. This is a very basic usage example, and I believe the FamilySearch API must have changed since the last update of this gem, because I am sure this worked before.

client.get(client.discover!['links']['current-user-person']['href'])
NoMethodError - undefined method `new' for [FamilySearch::Gedcomx::Identifier]:Array:
  familysearch-gedcomx (1.0.1) lib/familysearch/gedcomx/super_coercion.rb:66:in `[]='
  hashie (2.0.5) lib/hashie/dash.rb:141:in `block in initialize_attributes'
  hashie (2.0.5) lib/hashie/dash.rb:140:in `initialize_attributes'
  hashie (2.0.5) lib/hashie/dash.rb:100:in `initialize'
  familysearch-gedcomx (1.0.1) lib/familysearch/gedcomx/super_coercion.rb:49:in `block in []='
  familysearch-gedcomx (1.0.1) lib/familysearch/gedcomx/super_coercion.rb:45:in `[]='
  hashie (2.0.5) lib/hashie/dash.rb:141:in `block in initialize_attributes'
  hashie (2.0.5) lib/hashie/dash.rb:140:in `initialize_attributes'
  hashie (2.0.5) lib/hashie/dash.rb:100:in `initialize'
  familysearch-gedcomx (1.0.1) lib/familysearch/gedcomx/data_model.rb:614:in `initialize'
  familysearch (0.4.1) lib/familysearch/middleware/response/familysearch_gedcomx.rb:20:in `parse'
  familysearch (0.4.1) lib/familysearch/middleware/response/familysearch_gedcomx.rb:10:in `on_complete'
  faraday (0.8.8) lib/faraday/response.rb:9:in `block in call'
  faraday (0.8.8) lib/faraday/response.rb:63:in `on_complete'
  faraday (0.8.8) lib/faraday/response.rb:8:in `call'
  faraday (0.8.8) lib/faraday/response.rb:8:in `call'
  faraday (0.8.8) lib/faraday/connection.rb:253:in `run_request'
  faraday (0.8.8) lib/faraday/connection.rb:106:in `get'
...

Any idea what the problem could be? Is this project still active? (I see the last commit was 8 months ago)

jimmyz commented 10 years ago

Something changed in the data model. Problem fixed with latest version.