# Bundler and cookbook development.:

**URL:** <https://discourse.chef.io/t/bundler-and-cookbook-development/4931>\
**Category:** Chef Infra (archive)\
**Created:** [January 22, 2014, 4:00pm UTC](https://discourse.chef.io/t/bundler-and-cookbook-development/4931 "2014-01-22T16:00:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfredo\_Palhares](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/alfredo_palhares/32/335_2.png) [@Alfredo\_Palhares](https://discourse.chef.io/u/Alfredo_Palhares)\
**Post date:** [January 22, 2014, 4:00pm UTC](https://discourse.chef.io/t/bundler-and-cookbook-development/4931/1 "2014-01-22T16:00:01Z")

</div>

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/](https://rubygems.org/)........  
Fetching additional metadata from [https://rubygems.org/](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] [GitHub - alfredopalhares/cookbook-taskwarrior: A Chef cookbook to manage taskwarrior and friends.](https://github.com/masterkorp/cookbook-taskwarrior)

--  
Regards,  
Alfredo Palhares

---

<div class="post-metadata">

**Author:** ![Alfredo\_Palhares](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/alfredo_palhares/32/335_2.png) [@Alfredo\_Palhares](https://discourse.chef.io/u/Alfredo_Palhares)\
**Post date:** [January 22, 2014, 4:13pm UTC](https://discourse.chef.io/t/bundler-and-cookbook-development/4931/2 "2014-01-22T16:13:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Eric\_G\_Wolfe](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@Eric\_G\_Wolfe](https://discourse.chef.io/u/Eric_G_Wolfe)\
**Post date:** [January 22, 2014, 4:18pm UTC](https://discourse.chef.io/t/bundler-and-cookbook-development/4931/3 "2014-01-22T16:18:26Z")

</div>

Vagrant is not a gem any longer.

Latest non-gem packaged Vagrant from [vagrantup.com](http://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:
> 
> [[Breaking] Support Vagrant 1.1+ and remove vagrant gem dependency. by fnichol · Pull Request #7 · test-kitchen/kitchen-vagrant · GitHub](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

---

<div class="post-metadata">

**Author:** ![Alfredo\_Palhares](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/alfredo_palhares/32/335_2.png) [@Alfredo\_Palhares](https://discourse.chef.io/u/Alfredo_Palhares)\
**Post date:** [January 22, 2014, 4:34pm UTC](https://discourse.chef.io/t/bundler-and-cookbook-development/4931/4 "2014-01-22T16:34:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sme](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sme/32/271_2.png) [@sme](https://discourse.chef.io/u/sme)\
**Post date:** [January 22, 2014, 6:38pm UTC](https://discourse.chef.io/t/bundler-and-cookbook-development/4931/5 "2014-01-22T18:38:50Z")

</div>

Alfredo Palhares [masterkorp@masterkorp.net](mailto: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/](https://rubygems.org/)........  
> Fetching additional metadata from [https://rubygems.org/](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] [GitHub - alfredopalhares/cookbook-taskwarrior: A Chef cookbook to manage taskwarrior and friends.](https://github.com/masterkorp/cookbook-taskwarrior)
> 
> --  
> Regards,  
> Alfredo Palhares

--  
-sean
