Unable to create vagrant machine in Windows #147

Closed
richcave opened this Issue Oct 21, 2014 · 3 comments

Projects

None yet

2 participants

@richcave
Contributor

Using latest code base, I receive the following error message when running 'vagrant up' on Windows:

D:\Development\lagotto>vagrant up
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: D:/Development/lagotto/Vagrantfile
Message: cannot load such file -- librarian/action

Appears to be from this code block in Vagrantfile:

# workaround for shared folders with vmware and lxc providers
# see https://github.com/applicationsonline/librarian/issues/151
require 'librarian/action'
class Librarian::Action::Install < Librarian::Action::Base
  def create_install_path
    if install_path.exist?
      FileUtils.rm_rf("#{install_path}/.", secure: true)
    end
    install_path.mkpath
  end
end

Does this need to be performed only for vmware providers? If so, then can add to the check for vmware:

config.vm.provider :vmware_fusion do |fusion, override|
  fusion.vmx["memsize"] = "1024"

  provision(fusion, override)
end
@mfenner
Member
mfenner commented Oct 21, 2014

Please comment out that last code block with the require 'librarian/action'.

I'm in the middle of a major rewrite of the installation flow, so this will look very different within a week. Short version: all configuration variables for Vagrant, Chef, Capistrano and Rails become environment variables, and go into a single .env file. The code block above has changed to:

begin
  # requires librarian-chef plugin
  require "librarian/action"

  # workaround for shared folders with vmware and lxc providers
  # see https://github.com/applicationsonline/librarian/issues/151
  class Librarian::Action::Install < Librarian::Action::Base
    def create_install_path
      if install_path.exist?
        FileUtils.rm_rf("#{install_path}/.", secure: true)
      end
      install_path.mkpath
    end
  end
rescue LoadError
  $stderr.puts "Please install librarian-chef plugin with \"vagrant plugin install librarian-chef\""
  exit
end
@mfenner
Member
mfenner commented Oct 21, 2014

And there is a new Lagotto forum at http://discuss.lagotto.io if the issue is not a good fit for Github issues, e.g. general support question or feature request.

@mfenner mfenner added the bug label Oct 24, 2014
@mfenner
Member
mfenner commented Oct 27, 2014

The latest release now in the master branch resolves this issue.

@mfenner mfenner closed this Oct 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment