Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAILED: bundle exec vagabond init #39

Open
torandu opened this issue Aug 22, 2013 · 11 comments
Open

FAILED: bundle exec vagabond init #39

torandu opened this issue Aug 22, 2013 · 11 comments

Comments

@torandu
Copy link

torandu commented Aug 22, 2013

Hi Chris.
I can't get `bundle exec vagabond init' to run successfully. I'm stuck and wondering if you've run into this problem and/ or have any suggestions.

Some background:
I'm installing/ managing all dependencies using bundler, including chef and vagabond. The only system gem is bundler. I'm running init as a regular user (vagrant) in a vagrant VM built using the precise64-vanilla base box. (vanilla = no ruby, gem, chef, puppet)

Error:
http://paste.openstack.org/show/44912/

The output suggests a problem with user/ environment when vagabond calls chef-solo --that it's not using the bundler setup..

Any suggestions?

Thanks!
-sean

@torandu
Copy link
Author

torandu commented Aug 22, 2013

To note, I've tried using bundler binstubs, then export PATH=bin:$PATH, then calling the vagabond executable. That didn't work. I also tried installing using `bundle install --system --binstubs'. Also failed to help me work around the problem.

@chrisroberts
Copy link
Owner

Hi. Okay, a couple quick things. First, what ruby are you using? You say that there is no ruby on the system, but you are using gem and bundler. What's the path of the ruby and what's the version?

Second, you can try installing into the system using sudo bundle install --system so they are installed directly into the system gem path. I'm not sure if the system packages of rubygems ever fixed the gem binstub issue so it may still be not found. One final attempt can be to install chef on the system via omnibus, which will then make it available in the path and things will continue on.

Just to note, I use RVM locally and test using a custom built ruby. I will run some tests on my vagrant box using apt provided ruby and see what I come up with, even if it means pulling omnibus to get the host provisioned and installing a recent ruby version during that provision.

@torandu
Copy link
Author

torandu commented Aug 23, 2013

Chris.
Sorry! I meant to include ruby version info. :/

$ type -a ruby
ruby is /usr/bin/ruby
vagrant@precise64-vanilla:~$ ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

I install ruby (and some other packages) into my vagrant VM using a shell provider and calling a post-install script..

I'll try sudo bundle install --system, but I don't think that will work. It's not recommended/ supported. Regardless, it's worth testing out.

@torandu
Copy link
Author

torandu commented Aug 23, 2013

sudo bundle install --system did not work.

$ bundle exec vagabond init
bundler: command not found: vagabond
Install missing gem executables with `bundle install`

I'll test install chef on the system via omnibus.

@torandu
Copy link
Author

torandu commented Aug 23, 2013

Chris,
FWIW, here's a recording of the "ideal" install & initialization: http://ascii.io/a/5127

Also, here is my Vagrantfile: http://paste.openstack.org/show/45049/ and postinstall script: http://paste.openstack.org/show/45050/ in case you want to test using the same.

Re chef-repo, this is my Gemfile: http://paste.openstack.org/show/45053/ and Gemfile.lock: http://paste.openstack.org/show/45054/ .

@torandu
Copy link
Author

torandu commented Aug 23, 2013

One final attempt can be to install chef on the system

I tested this. Failed: Could not find chef (>= 0)

@chrisroberts
Copy link
Owner

Okay, something that might be worthwhile. I haven't looked to see where the ref in your Gemfile is pointing, but if you point at the current HEAD of develop and give it a run again, does it properly get the provision going? There was some code added recently that detects when running within bundler and adds the bundle exec bits to the sudo and that might be the simple fix to get it rolling.

If it does fix it, it still has brought up an important point of the ruby package available via apt on precise and that it would probably be useful to allow installing and using a more up-to-date ruby, even if that means just doing an omnibus install and hijacking that ruby.

Anyway, let me know what you find with an updated bundle and I'll play around this weekend with the vanilla precise box provisioning.

@chrisroberts
Copy link
Owner

And thanks for the verbosity in this ticket! Makes it super easy to see exactly what you're running into 👍

@torandu
Copy link
Author

torandu commented Aug 26, 2013

if you point at the current HEAD of develop and give it a run again, does it properly get the provision going?

No, that also failed.

http://paste.openstack.org/show/45152/

@torandu
Copy link
Author

torandu commented Aug 26, 2013

it would probably be useful to allow installing and using a more up-to-date ruby

What version are you using for dev/ testing? I'll test using the same.

@chrisroberts
Copy link
Owner

Okay, here we go. Vagrantfile in develop to use a preseed box if you'd like:

https://github.com/chrisroberts/vagabond/blob/develop/Vagrantfile

and it also includes some inline commands to get a more recent ruby installed on the box. Using this plus a Gemfile with:

source 'https://rubygems.org'
gem 'vagabond', git: 'git://github.com/chrisroberts/vagabond.git', branch: 'develop'

and a sudo bundle install and everything was working swell. Let me know if that gets you rolling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants