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

uninitialized constant WaterDrop::Contracts::MessageOptions (NameError) #552

Closed
jainanda-k opened this issue Nov 6, 2019 · 7 comments
Closed
Assignees
Labels

Comments

@jainanda-k
Copy link

Encountering the following error when trying to run the rails server.
uninitialized constant WaterDrop::Contracts::MessageOptions (NameError)

Note: Karafka server runs fine and messages are consumed successfully.

Karafka version: 1.3.0
Ruby version: 2.5.3
Ruby-kafka version: 0.7.10
Application client id: my_app
Backend: inline
Batch fetching: true
Batch consuming: false
Boot file: /home/*****/my_application/karafka.rb
Environment: development
Kafka seed brokers: ["kafka://localhost:9092"]

@mensfeld
Copy link
Member

mensfeld commented Nov 7, 2019

What waterdrop version are you using? Can you create a small repro script?

@mensfeld mensfeld self-assigned this Nov 7, 2019
@jainanda-k
Copy link
Author

What waterdrop version are you using? Can you create a small repro script?

I did not manually install Waterdrop. It got installed with karafka.
Anyway the issue was with version mismatch of Rails and karafka. This issue is there in Rails 5 and Karafka 1.3. It got solved once I downgraded my Karafka version to 1.2.12.
Similarly, Karafka 1.3 works fine with Rails 6.

@mensfeld
Copy link
Member

mensfeld commented Nov 7, 2019

I would still want to fix it for Rails 5 and Karafka 1.3. Could you create an example repro repo?

@shekhar098
Copy link

mark_as_consumed! method is not available in 1.2.12. Is there another method similar to this?

@mensfeld
Copy link
Member

mensfeld commented Nov 11, 2019

@shekhar098 #mark_as_consumed?

https://github.com/karafka/karafka/blob/1.2-stable/lib/karafka/base_consumer.rb#L13

@mensfeld
Copy link
Member

mensfeld commented Dec 9, 2019

I see you're satisfied with the answer. Closing :)

@ojab
Copy link
Contributor

ojab commented Dec 25, 2019

It's bootsnap issue with ruby-2.5 and iseq compile cache enabled (at least it was in my case).
See Shopify/bootsnap#257.

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

No branches or pull requests

4 participants