Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: missing dependency for FaradayMiddleware::Deashify: undefined method type' for class Hashie::Mash' #60

Closed
ryanfelton opened this issue Jun 2, 2015 · 9 comments

Comments

@ryanfelton
Copy link
Contributor

When looking up a customer with email addresses or phone numbers that have a "type" associated with them, the gem fails to parse the response.

Desk.create_customer(
    :first_name => "Joe",
    :last_name => "User",
    :emails => [{:type => "work", :value => "joe.user@example.org"}]
)

Yields this error:

RuntimeError: missing dependency for FaradayMiddleware::Deashify: undefined method type' for class Hashie::Mash'

@ryanfelton
Copy link
Contributor Author

This is also true for the request

> Desk.customer("123456789")
RuntimeError: missing dependency for FaradayMiddleware::Deashify: undefined method `type' for class `Hashie::Mash'

@ryanfelton
Copy link
Contributor Author

I think it's related to an change in Hashie:
hashie/hashie@61fc9a9

@robins35
Copy link

robins35 commented Jun 4, 2015

Having the same problem here.

@robins35
Copy link

robins35 commented Jun 4, 2015

Fixed by locking hashie at 3.4.0

@thomasbalsloev
Copy link

Yup, same problem here. Fixed by locking Hashie gem at 3.4.1. Methods "type" and "id" are removed in Hashie version >= 3.4.2.
See https://github.com/intridea/hashie/blob/master/CHANGELOG.md

AfonsoTsukamoto pushed a commit to AfonsoTsukamoto/desk that referenced this issue Sep 1, 2015
@patakijv
Copy link

patakijv commented Oct 6, 2015

Can the fix from Afonso be merged and submitted to rubygems source?

@jwfearn
Copy link

jwfearn commented Nov 2, 2015

+1 please merge Afonso's fix and update rubygems

@chriswarren
Copy link
Owner

Done. Very sorry for the delay on this.

@saverio-kantox
Copy link
Contributor

Maybe it was just the Mash.send :undef_method, :type in https://github.com/chriswarren/desk/blob/master/lib/desk/deash.rb#L21 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants