Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.vagrant.plugins source does not resolve correctly #13361

Open
polarissunshine opened this issue Mar 8, 2024 · 0 comments
Open

config.vagrant.plugins source does not resolve correctly #13361

polarissunshine opened this issue Mar 8, 2024 · 0 comments

Comments

@polarissunshine
Copy link

Vagrant version = Vagrant 2.4.1
Host Machine = Windows 10

I have a local .gem plugin for my project. The plugin works. I would like to add it as required plugin in the Vagrantfile. Due to the structure of the project I want the gem file in a directory up from the Vagrantfile, so other Vagrantfiles can also access the plugin gem. So I would like do:

config.vagrant.plugins = {"own-plugin" => {"version" => "0.1.0", "sources" => "../own-plugin-0.1.0.gem"}}

But I get this error

Install local plugins (Y/N) [N]: Y
Installing the 'own-plugin' plugin. This can take a few minutes...
Vagrant failed to initialize at a very early stage:

Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

Unable to resolve dependency: user requested 'own-plugin (= 0.1.0)'

But all of this work.

config.vagrant.plugins = {"own-plugin" => {"version" => "0.1.0", "sources" => "own-plugin-0.1.0.gem"}}
vagrant plugin install ..\own-plugin-0.1.0.gem
vagrant plugin install ..\own-plugin-0.1.0.gem --local

I'm not sure why moving the gem file one directory up does not work with the config.vagrant.plugins.

I also tried to pass in the absolute path to the gem in the Vagrantfile, but that does not work either. Any workarounds or solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant