I am trying to setup a jenkins worker that executes a rake task. This Rake task uses vagrant to test puppet manifests in a clean environment. I use the default beaker setup:
desc "Run acceptance tests" RSpec::Core::RakeTask.new(:acceptance) do |t| t.pattern = 'spec/acceptance' end With the default spec_helper from: https://github.com/puppetlabs/beaker/wiki/How-to-Write-a-Beaker-Test-for-a-Module The jenkins worker (which exists over multiple different jobs) creates an RVM environment, installs the gems from the Gemfile and invokes "bundle exec rake acceptance". Then I get an error message, stating that vagrant is not part of the bundle and that I should add it to my Gemfile to proceed. When I do so vagrant complains about not being installable by rubygems anymore. Merely I should install the system package. If I do that I still get the error about Vagrant being installed as gem. When I remove the gem from the Gemfile, I get the error about Vagrant not being part of my bundle. So I thought maybe I can run "rake acceptance" without bundler, since all my gems are inside my RVM environment. When I do that, the error is: $ rake acceptance /usr/local/rvm/rubies/ruby-1.9.3-p547/bin/ruby -S rspec spec/acceptance Hypervisor for debian-73-x64-virtualbox-puppet is vagrant Beaker::Hypervisor, found some vagrant boxes to create /usr/bin/vagrant:3:in `require': cannot load such file -- vagrant (LoadError) from /usr/bin/vagrant:3:in `<main>' /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/hypervisor/vagrant.rb:151:in `block in vagrant_cmd': Failed to exec 'vagrant destroy --force' (RuntimeError) from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/hypervisor/vagrant.rb:145:in `chdir' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/hypervisor/vagrant.rb:145:in `vagrant_cmd' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/hypervisor/vagrant.rb:106:in `provision' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/hypervisor.rb:58:in `create' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/network_manager.rb:52:in `block in provision' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/network_manager.rb:51:in `each_key' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-1.11.0/lib/beaker/network_manager.rb:51:in `provision' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-rspec-2.2.4/lib/beaker-rspec/beaker_shim.rb:29:in `provision' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-rspec-2.2.4/lib/beaker-rspec/spec_helper.rb:38:in `block in <top (required)>' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core.rb:120:in `configure' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-rspec-2.2.4/lib/beaker-rspec/spec_helper.rb:5:in `<top (required)>' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-rspec-2.2.4/lib/beaker-rspec.rb:5:in `require' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-rspec-2.2.4/lib/beaker-rspec.rb:5:in `<module:BeakerRSpec>' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/beaker-rspec-2.2.4/lib/beaker-rspec.rb:1:in `<top (required)>' from /var/lib/jenkins/workspace/foss-puppet-puma/spec/spec_helper_acceptance.rb:1:in `require' from /var/lib/jenkins/workspace/foss-puppet-puma/spec/spec_helper_acceptance.rb:1:in `<top (required)>' from /var/lib/jenkins/workspace/foss-puppet-puma/spec/acceptance/puma__app_spec.rb:1:in `require' from /var/lib/jenkins/workspace/foss-puppet-puma/spec/acceptance/puma__app_spec.rb:1:in `<top (required)>' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `block in load_spec_files' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `each' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load_spec_files' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:22:in `run' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run' from /var/lib/jenkins/workspace/foss-puppet-puma/vendor/bundle/ruby/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun' /usr/local/rvm/rubies/ruby-1.9.3-p547/bin/ruby -S rspec spec/acceptance failed So vagrant seems to be in my PATH but when executing it, it´s not in my LOAD_PATH anymore, because RVM changed everything. What is the right way to use vagrant inside an RVM setting? Or with Bundler? Since vagrant complains about being installed via Gem a simple "bundle install --path vendor/bundle" did not work out either. I am thankful for any hint I can get. Cheers! -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
