Rbenv and minitest-chef-handler, any caveats?


#1

Hi,

I’m adding test-kitchen tests to some of my cookbooks, and I’m having
trouble with one that uses rbenv to install a specific version of ruby.

Specifically, my node converges normally, but when the times comes to
run minitest-chef-handler, I get an error:

[Sat, 10 Nov 2012 15:30:52 +0000] INFO: Running report handlers
[Sat, 10 Nov 2012 15:30:52 +0000] ERROR: Report handler
MiniTest::Chef::Handler raised #<Gem::LoadError: Could not find highline
(>= 1.6.9) amongst [daemons-1.1.9, eventmachine-0.12.10, json_pure-1.7.5,
minitest-1.6.0, nats-0.4.28, rack-1.4.1, rake-0.8.7, rdoc-2.5.8,
thin-1.5.0]>

Looking at the VM, it seems that minitest-chef-handler and its dependencies
have been installed with the Omnibus rubygem, but then report handlers are
being run within the new rbenv environment.

Did anybody see this problem, and if so how did you solve it?

Andrea


#2

I dug in a bit more and it seems it’s actually rbenv_gem , not rbenv per se.

I could still use some ideas :slight_smile:

On Sat, Nov 10, 2012 at 4:38 PM, Andrea Campi
andrea.campi@zephirworks.comwrote:

Hi,

I’m adding test-kitchen tests to some of my cookbooks, and I’m having
trouble with one that uses rbenv to install a specific version of ruby.

Specifically, my node converges normally, but when the times comes to
run minitest-chef-handler, I get an error:

[Sat, 10 Nov 2012 15:30:52 +0000] INFO: Running report handlers
[Sat, 10 Nov 2012 15:30:52 +0000] ERROR: Report handler
MiniTest::Chef::Handler raised #<Gem::LoadError: Could not find highline
(>= 1.6.9) amongst [daemons-1.1.9, eventmachine-0.12.10, json_pure-1.7.5,
minitest-1.6.0, nats-0.4.28, rack-1.4.1, rake-0.8.7, rdoc-2.5.8,
thin-1.5.0]>

Looking at the VM, it seems that minitest-chef-handler and its
dependencies have been installed with the Omnibus rubygem, but then report
handlers are being run within the new rbenv environment.

Did anybody see this problem, and if so how did you solve it?

Andrea