vagrant up fails with cannot load winrm

lalo picture lalo · Jan 26, 2016 · Viewed 8.8k times · Source

I am trying to run a Vagrant box with SQL Server for local development. I am running Fedora 23. The box in question is this.

vagrant up fails with the following error message:

/usr/share/vagrant/plugins/communicators/winrm/shell.rb:9:in `require':
cannot load such file -- winrm (LoadError)

I have tried to install winrm with gem install winrm, and it installs just fine, but vagrant still fails.

The following ruby script runs without errors:

require "winrm"
puts "hello world"

Does anyone know how to fix this?

Answer

jim-minter picture jim-minter · Oct 18, 2016

The winrm and winrm-fs gems are not packaged with Fedora or Debian. You can run:

$ vagrant plugin install winrm
$ vagrant plugin install winrm-fs

(i.e. vagrant plugin install, not gem install).

Note: Using Vagrant version 1.8.1, the winrm gem failed to install and this fixed it:

$ vagrant plugin install winrm --plugin-version 1.8.1
$ vagrant plugin install winrm-fs