Open torandu opened 11 years ago
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.
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.
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.
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.
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/ .
One final attempt can be to install chef on the system
I tested this. Failed: Could not find chef (>= 0)
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.
And thanks for the verbosity in this ticket! Makes it super easy to see exactly what you're running into :+1:
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.
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.
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.
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