I think I figured out why it's failing inside the source of
plugins/commands/plugin/action/prune_gems.rb. In fact the problem might be
worse than I originally described. Any plugin where there is a dependency
on *any* default gem will fail to install.
When loading in all gems, default ones are ignored:
# Get the actual specifications of installed gems
all_specs = env[:gem_helper].with_environment do
[].tap do |result|
Gem::Specification.find_all do |s|
# Ignore default gems since they can't be uninstalled
next if s.respond_to?(:default_gem?) && s.default_gem?
result << s
end
end
end
But then of course it can't be found when there's a dependency on it,
so there's the error:
if latest_matching.nil?
@logger.error("Missing dependency for
'#{spec.name}': #{dep.name}")
next
end
I have no idea why this only fails in Windows though! And I don't know if
it's good news or bad news that all this code has been deleted in master
since the 1.4.3 release. How can this be patched to get it working
Rhys
On 4 February 2014 14:07, Rhys Gareth <[email protected]> wrote:
> Seeing as my other thread diverged too far from its original title..
>
> A fresh install of vagrant on Windows and "vagrant plugin install
> vagrant-librarian-chef" fails. The error comes when "Pruning gems" for chef
> and chef-solo:
>
> DEBUG prune: Finding dependencies for 'chef' to mark as good...
> [...]
> DEBUG prune: Searching for: 'json'
> ERROR prune: Missing dependency for 'chef': json
>
> Same for chef-solo. Chef solo doesn't even state a version dependency on
> json, meanwhile chef's version range is fine for the json 1.7.7 which comes
> bundled.
>
> Given that json is a "default gem" - how can this be happening? The same
> plugin is fine on Linux and OSX.
>
> I've tried every hack I can think of to help Vagrant find this supposedly
> missing dependency, or to get it to skip looking for it. Nothing I've tried
> works. Is it really the case that any plugin which has a dependency on JSON
> will fail to load in Vagrant for Windows, or is there something specific
> about chef? Any workarounds possible, including even downgrading Vagrant?
>
> Rhys
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Vagrant" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/vagrant-up/jhVQ6HqWkMs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.