Skip to content

Instantly share code, notes, and snippets.

@walterheck
Created December 19, 2016 08:27
Show Gist options
  • Save walterheck/9ddc42ef9bcdfa27741b34303f53d26b to your computer and use it in GitHub Desktop.
Save walterheck/9ddc42ef9bcdfa27741b34303f53d26b to your computer and use it in GitHub Desktop.
walterheck@walter-envy:~/source/opstheater/deploy/vagrant-oscar$ vagrant provision foss-master
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: /home/walterheck/Dropbox/Source/opstheater/deploy/vagrant-oscar/Vagrantfile
Line number: 4
Message: LoadError: cannot load such file -- git
require 'rubygems'
require 'git'
git = Git.open(Dir.pwd + "../../..")
ENV['GIT_BRANCH'] = ENV['GIT_BRANCH'] || git.current_branch
walterheck@walter-envy:~/source/opstheater/deploy/vagrant-oscar$ irb
irb(main):001:0> require 'git'
=> true
irb(main):002:0> Git.open(Dir.pwd + "../../..").current_branch
=> "refactoring"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment