Bundler and cookbook development.:


#1

Hello chefs,

I was going to start using Bundler on my cookbook[1] to ensure the specific versions of each
system is working with the future collaborators. But when adding a Gemfile and get the bundle on
vagrant can’t detect Virtualbox

$ kitchen converge
kitchen-----> Starting Kitchen (v1.1.1)

------Exception-------
Class: Kitchen::ShellOut::ShellCommandFailed
Message: Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant --version ----
STDOUT:
STDERR: =====================================================================
Vagrant experienced an error!

Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
If VirtualBox is installed, it may be an incorrect version. Vagrant currently
requires VirtualBox 3.2.x. Please install the proper version to continue.

---- End output of vagrant --version ----
Ran vagrant --version returned 1


Please see .kitchen/logs/kitchen.log for more details

and if I lock the vagrant version to >=1

I get the following
$ bundle
bundleFetching gem metadata from https://rubygems.org/
Fetching additional metadata from https://rubygems.org/
Resolving dependencies…
Bundler could not find compatible versions for gem “net-scp”:
In Gemfile:
vagrant (>= 1) ruby depends on
net-scp (~> 1.0.4) ruby

test-kitchen (>= 1) ruby depends on
  net-scp (1.1.2)

If i dont force the version of vagrant its install 0.5.4 with does not use the “~” it uses the
net-scp >= 1.0.2 which sudently makes it OK, lol.

Withou bundler it all works like a charm, why doesn’t bundler use the 2 versions of the gem
like normal gems do?

[1] https://github.com/masterkorp/cookbook-taskwarrior


Regards,
Alfredo Palhares


#2

Following this problem:

But the rubygems version of vagrant stops on 1.0.7 ??

While my archlinux version is 1.4.3 ?


Regards,
Alfredo Palhares


#3

Vagrant is not a gem any longer.

Latest non-gem packaged Vagrant from vagrantup.com is 1.4.3.

Eric G. Wolfe
Senior Linux Administrator,
IT Infrastructure Systems

Marshall University Computing Services
Drinko Library 428-K
One John Marshall Dr.
Huntington, WV 25755
Phone: 304.942.3970
Email: eric.wolfe@marshall.edu

History repeats itself – the first time as a tragi-comedy, the second
time as bedroom farce.

On 01/22/2014 11:13 AM, Alfredo Palhares wrote:

Following this problem:

https://github.com/test-kitchen/kitchen-vagrant/pull/7

But the rubygems version of vagrant stops on 1.0.7 ??

While my archlinux version is 1.4.3 ?


Regards,
Alfredo Palhares


#4

Hello Erik,

So this its a test-kitchen issue right ?
I dont know why bundler forces me to add the gem to the gemfile.


Regards,
Alfredo Palhares


#5

Alfredo Palhares masterkorp@masterkorp.net writes:

Hello chefs,

I was going to start using Bundler on my cookbook[1] to ensure the specific versions of each
system is working with the future collaborators. But when adding a Gemfile and get the bundle on
vagrant can’t detect Virtualbox

$ kitchen converge
kitchen-----> Starting Kitchen (v1.1.1)

------Exception-------
Class: Kitchen::ShellOut::ShellCommandFailed
Message: Expected process to exit with [0], but received ‘1’
---- Begin output of vagrant --version ----
STDOUT:
STDERR: =====================================================================
Vagrant experienced an error!

Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
If VirtualBox is installed, it may be an incorrect version. Vagrant currently
requires VirtualBox 3.2.x. Please install the proper version to continue.

---- End output of vagrant --version ----
Ran vagrant --version returned 1


Please see .kitchen/logs/kitchen.log for more details

and if I lock the vagrant version to >=1

I get the following
$ bundle
bundleFetching gem metadata from https://rubygems.org/
Fetching additional metadata from https://rubygems.org/
Resolving dependencies…
Bundler could not find compatible versions for gem “net-scp”:
In Gemfile:
vagrant (>= 1) ruby depends on
net-scp (~> 1.0.4) ruby

test-kitchen (>= 1) ruby depends on
  net-scp (1.1.2)

Looks to me like you have vagrant in the Gemfile. This isn’t needed. Since
you’re using test-kitchen you should be able to work with just two lines
in the Gemfile:

gem 'test-kitchen’
gem ‘kitchen-vagrant’

Optionally, you can add version constraints.

If i dont force the version of vagrant its install 0.5.4 with does not use the “~” it uses the
net-scp >= 1.0.2 which sudently makes it OK, lol.

Withou bundler it all works like a charm, why doesn’t bundler use the 2 versions of the gem
like normal gems do?

[1] https://github.com/masterkorp/cookbook-taskwarrior


Regards,
Alfredo Palhares


-sean