On 12/14/22, Henry R <support(a)openmbox.net> wrote:
I have installed "bunny" (rabbitmq client)
via gem.
but this package can't be loaded. please see follows.
$ sudo gem install bunny
Successfully installed bunny-2.19.0
$ irb
irb(main):001:0> require "bunny"
`require': cannot load such file -- bunny (LoadError)
Try just "gem install bunny" without the sudo. That should install the
gem to $HOME/.gem:
Our snap sets the GEM_HOME and GEM_PATH environment variables
to $HOME/.gem.
https://www.ruby-lang.org/en/news/2018/11/08/snap/
I guess that sudo is not loading the snap environment so the gem is
getting installed to /var/lib/gems so is not found when run the snap
ruby under your account.