-
Notifications
You must be signed in to change notification settings - Fork 116
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
Calls to Diplomat::Service fail with uninitialized constant Diplomat::Service::OpenStruct #26
Comments
Hey @thedebugger thanks for this! I will look into it on the weekend and see why the tests aren't failing before we try and fix this. |
@thedebugger it's strange that I'm not getting any error when I'm running the specs, and both the code and the specs use openstruct quite regularly. I also tried querying for a service from irb: consul agent -bootstrap -server -data-dir=/tmp irb
require_relative 'lib/diplomat.rb'
Diplomat::Service.get 'consul'
=> #<OpenStruct Node="Johns-MacBook-Pro-3.local", Address="10.133.10.100", ServiceID="consul", ServiceName="consul", ServiceTags=[], ServicePort=8300> |
@johnhamelink, rspecs works fine. And, what gems did you load in 'irb'? I think you will be able to replicate the problem when the application (and it dependencies) doesn't require 'ostruct'. To workaround, I added |
@thedebugger other than cd'ing into the diplomat source, I'm not doing anything other than what I described in the comment above... I will explicitly include ostruct if this solves your issue, but I'm still not 100% on why its not happening for anyone else... |
hmm..let me see if I can replicate it. |
Thanks @thedebugger :) |
How did you get on @thedebugger ? |
Didn't get a chance to reproduce it, yet. — On Thu, May 7, 2015 at 9:23 PM, John Hamelink notifications@github.com
|
Cool, let us know when you get round to it 👍 |
@thedebugger I'm going to close this issue for now until you can get back to us! Thanks 😄 |
I think we need to add
require 'ostruct'
. Weird that no one ran into this issue. Thoughts?The text was updated successfully, but these errors were encountered: