I have developed a Ruby gem called safe-eth-ruby
, hosted on https://github.com/scionx-io/safe-eth-ruby/tree/bm-improve-test. While the gem installs and loads without any errors, I encounter an issue with uninitialized constants when trying to access specific modules directly in IRB initialized with bundle exec irb
.
For example:
irb(main):001> SafeEthRuby::Protocol
# Results in: uninitialized constant SafeEthRuby::Protocol (NameError)
However, if I manually require the gem within the session:
irb(main):004> require "safe_eth_ruby"
=> true
irb(main):005> SafeEthRuby::Protocol
=> SafeEthRuby::Protocol
After requiring it manually, everything works as expected. I would like to understand why the components of the gem aren’t loaded automatically and how I can configure it to ensure they are available without manually requiring the gem each time in the console. Any suggestions on what might be missing in my gem setup or any Ruby configuration tips would be greatly appreciated.
Thank you!