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

NameError (uninitialized constant Hutch::Broker::Bunny) on JRuby #394

Open
nulllvoid opened this issue Feb 13, 2023 · 2 comments
Open

NameError (uninitialized constant Hutch::Broker::Bunny) on JRuby #394

nulllvoid opened this issue Feb 13, 2023 · 2 comments

Comments

@nulllvoid
Copy link

-> irb
Ignoring jaro_winkler-1.5.4 because its extensions are not built. Try: gem pristine jaro_winkler --version 1.5.4
jruby-9.3.3.0 :001 > require 'hutch'
=> true
jruby-9.3.3.0 :002 > Hutch.connect
2023-02-13T09:38:07Z 82398 INFO -- connecting to rabbitmq (amqp://[email protected]:5672/)
2023-02-13T09:38:07Z 82398 INFO -- connected to RabbitMQ at 127.0.0.1 as guest
2023-02-13T09:38:07Z 82398 INFO -- opening rabbitmq channel with pool size 1, abort on exception false
2023-02-13T09:38:07Z 82398 INFO -- using topic exchange 'hutch'
Traceback (most recent call last):
16: from /Users/shivamshah/.rvm/rubies/jruby-9.3.3.0/lib/ruby/gems/shared/gems/irb-1.0.0/exe/irb:11:in <main>' 15: from org/jruby/RubyKernel.java:1237:in catch'
14: from org/jruby/RubyKernel.java:1237:in catch' 13: from org/jruby/RubyKernel.java:1507:in loop'
12: from org/jruby/RubyKernel.java:1091:in eval' 11: from (irb):2:in evaluate'
10: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch.rb:45:in connect' 9: from org/jruby/ext/thread/Mutex.java:171:in synchronize'
8: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch.rb:48:in block in connect' 7: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch/broker.rb:48:in connect'
6: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch/broker.rb:87:in set_up_amqp_connection' 5: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch/broker.rb:135:in declare_exchange!'
4: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch/broker.rb:129:in declare_exchange' 3: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch/broker.rb:355:in with_bunny_precondition_handler'
2: from /Users/shivamshah/.rvm/gems/jruby-9.3.3.0/gems/hutch-1.1.0/lib/hutch/broker.rb:130:in block in declare_exchange' 1: from org/jruby/RubyModule.java:3948:in const_missing'
NameError (uninitialized constant Hutch::Broker::Bunny)

@nulllvoid
Copy link
Author

getting this issue on bundle exec hutch also

@michaelklishin michaelklishin changed the title NameError (uninitialized constant Hutch::Broker::Bunny) NameError (uninitialized constant Hutch::Broker::Bunny) on JRuby Feb 14, 2023
@michaelklishin
Copy link
Member

JRuby constant resolution behavior must be somehow different from CRuby and it affects broker.rb in Hutch. JRuby users are welcome to investigate this.

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

2 participants