hashicorp/vagrant · error · Vagrant::Errors::PluginLoadError

The plugins failed to load properly. The error message given

Error message

The plugins failed to load properly. The error message given is
shown below.

%{message}

What it means

Raised from Vagrant::Plugin::Manager#load_plugins when requiring an installed plugin's gem files — or running ::Bundler.require(:plugins) — raises any ScriptError or StandardError (lib/vagrant/plugin/manager.rb:374). Typical causes: a plugin written against a different Vagrant plugin API version, an uncompiled native extension, a missing runtime dependency, or plugin code that raises at require time. Plugins load during Vagrant startup, so this can surface on any `vagrant` command, and %{message} contains the original exception text.

Source

Thrown at lib/vagrant/plugin/manager.rb:374

                  raise
                end
              end
            else
              @logger.debug("Loading plugin `#{plugin_name}` with custom require: `#{plugin_info["require"]}`")
              require plugin_info["require"]
            end
            @logger.debug("Successfully loaded plugin `#{plugin_name}`.")
          end
          if defined?(::Bundler)
            @logger.debug("Bundler detected in use. Loading `:plugins` group.")
            ::Bundler.require(:plugins)
          end
        rescue ScriptError, StandardError => err
          @logger.error("Plugin loading error: #{err.class} - #{err}")
          err.backtrace.each do |backtrace_line|
            @logger.debug(backtrace_line)
          end
          raise Vagrant::Errors::PluginLoadError, message: err.to_s
        end
        nil
      end

      # Check if the requested plugin is installed
      #
      # @param [String] name Name of plugin
      # @param [String] version Specific version of the plugin
      # @return [Boolean]
      def plugin_installed?(name, version=nil)
        # Make the requirement object
        version = Gem::Requirement.new([version.to_s]) if version

        # If plugins are loaded, check for match in loaded specs
        if ready?
          return installed_specs.any? do |s|
            match = s.name == name
            next match if !version

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Identify the failing plugin from the %{message} text (class name or gem path) and cross-check with `vagrant plugin list`
  2. Run `vagrant plugin update <name>` — a newer release may support your Vagrant version
  3. If no fixed release exists, `vagrant plugin uninstall <name>` to get Vagrant bootable again
  4. If uninstall also fails at startup, back up and remove the plugin's entry from ~/.vagrant.d/plugins.json by hand, then delete its gem from ~/.vagrant.d/gems
Defensive patterns

Strategy: try-catch

Try / catch

begin
  env = Vagrant::Environment.new
  env.load_plugins rescue Vagrant::Errors::PluginLoadError => e
    warn "plugin failed to load: #{e.message}"
    # identify and uninstall the offender, or restore a backup of plugins.json
  end

Prevention

When it happens

Trigger: Any vagrant invocation after a plugin is installed whose gem fails to require: LoadError for the plugin's own dependencies, SyntaxError in plugin code, NameError from API changes (e.g. a v1-era plugin touching removed constants), or a native extension built for a different Ruby than the new embedded one.

Common situations: Upgrading Vagrant (embedded Ruby major bump) without upgrading plugins; abandoned plugins incompatible with the current Vagrant; a gem install that left a broken native extension; plugin depending on a gem excluded from Vagrant's bundled environment.

Related errors


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/985072bc9de643e3. Report an issue: GitHub.