Ask Your Question
0

beaker No such file or directory - vagrant

asked 2016-04-15 12:33:41 -0500

updated 2016-04-28 13:25:08 -0500

This is my first adventure with beaker. I downloaded the puppetlabs-mysql module. I ran bundle exec rspec spec/acceptance in the mysql folder and i get this error:

[vagrant@localhost mysql]$ bundle exec rspec spec/acceptance/

/home/vagrant/.gem/ruby/gems/beaker-rspec-5.3.0/lib/beaker-rspec/helpers/serverspec.rb:43: warning: already initialized constant Module::VALID_OPTIONS_KEYS
/home/vagrant/.gem/ruby/gems/specinfra-2.56.1/lib/specinfra/configuration.rb:4: warning: previous definition of VALID_OPTIONS_KEYS was here
Beaker::Hypervisor, found some vagrant boxes to create
/usr/share/ruby/open3.rb:211:in `spawn': No such file or directory - vagrant (Errno::ENOENT)
        from /usr/share/ruby/open3.rb:211:in `popen_run'
        from /usr/share/ruby/open3.rb:99:in `popen3'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:191:in `block in vagrant_cmd'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:189:in `chdir'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:189:in `vagrant_cmd'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/hypervisor/vagrant.rb:151:in `provision'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/hypervisor.rb:75:in `create'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/network_manager.rb:69:in `block in provision'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/network_manager.rb:68:in `each_key'
        from /home/vagrant/.gem/ruby/gems/beaker-2.39.0/lib/beaker/network_manager.rb:68:in `provision'
        from /home/vagrant/.gem/ruby/gems/beaker-rspec-5.3.0/lib/beaker-rspec/beaker_shim.rb:35:in `provision'
        from /home/vagrant/.gem/ruby/gems/beaker-rspec-5.3.0/lib/beaker-rspec/spec_helper.rb:46:in `block in <top (required)>'
        from /home/vagrant/.gem/ruby/gems/rspec-core-3.4.4/lib/rspec/core.rb:97:in `configure'
        from /home/vagrant/.gem/ruby/gems/beaker-rspec-5.3.0/lib/beaker-rspec/spec_helper.rb:5:in `<top (required)>'
        from /home/vagrant/.gem/ruby/gems/beaker-rspec-5.3.0/lib/beaker-rspec.rb:5:in `require'
        from /home/vagrant/.gem/ruby/gems/beaker-rspec-5.3.0/lib/beaker-rspec.rb:5:in `<module:BeakerRSpec>'
        from /home/vagrant/.gem/ruby/gems/beaker-rspec-5.3.0/lib/beaker-rspec.rb:1:in `<top (required)>'
        from /home/vagrant/.puppet/modules/mysql/spec/spec_helper_acceptance.rb:1:in `require'
        from /home/vagrant/.puppet/modules/mysql/spec/spec_helper_acceptance.rb:1:in `<top (required)>'
        from /home/vagrant/.puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb:1:in `require'
        from /home/vagrant/.puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb:1:in `<top (required)>'
        from /home/vagrant/.gem/ruby/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `load'
        from /home/vagrant/.gem/ruby/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
        from /home/vagrant/.gem/ruby/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
        from /home/vagrant/.gem/ruby/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
        from /home/vagrant/.gem/ruby/gems/rspec-core-3.4.4 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-04-19 09:32:18 -0500

updated 2016-06-27 10:56:45 -0500

I finally got this working by using a docker image for running beaker on it and it worked like a charm.

Trying to do it with a vagrant instance from a vagrant VM seemed like a memory heavy process and it killed my VM.

Docker seemed to be the best approach in my case.

edit flag offensive delete link more
0

answered 2016-04-19 03:35:59 -0500

Usually Beaker is used as a frontend to Vagrant, so I normally download the code to my Mac, and then run bundle exec rspec spec/acceptance, and then allow Beaker to provision a Vagrant box, in which Puppet then runs. Are those errors saying that you don't have Vagrant installed inside your Vagrant box?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-15 12:33:41 -0500

Seen: 298 times

Last updated: Jun 27 '16