Coder Social home page Coder Social logo

Comments (16)

cbreden avatar cbreden commented on June 25, 2024

I am also getting this, with the same thing after a clean install.

C:\Users\cbreden\Documents\vagrant\c-vbox1\the_commons>vagrant -v
Vagrant 1.7.2

C:\Users\cbreden\Documents\vagrant\c-vbox1\the_commons>vagrant plugin list
vagrant-berkshelf (4.0.2)
vagrant-chef-zero (0.7.1)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.4, system)
vagrant-vcenter (0.3.2)

C:\Users\cbreden\Documents\vagrant\c-vbox1\the_commons>vagrant up
Bringing machine 'cbreden-chef1' up with 'virtualbox' provider...
the ffi-yajl and yajl-ruby gems have incompatible C libyajl libs and should not be loaded in the same Ruby VM
falling back to ffi which might work (or might not, no promises)
C:/Users/cbreden/.vagrant.d/gems/gems/chef-11.6.0/lib/chef/provider/env/windows.rb:20:in `require': cannot load such file -- ruby-wmi (LoadError)
        from C:/Users/cbreden/.vagrant.d/gems/gems/chef-11.6.0/lib/chef/provider/env/windows.rb:20:in `<top (required)>'
        from C:/Users/cbreden/.vagrant.d/gems/gems/chef-11.6.0/lib/chef/providers.rb:51:in `require'
        from C:/Users/cbreden/.vagrant.d/gems/gems/chef-11.6.0/lib/chef/providers.rb:51:in `<top (required)>'
        ...

I tried to shoe-in ruby-wmi to both gem directories like so:

cmd /C "set GEM_HOME=C:/Users/cbreden/.vagrant.d/gems&& C:\HashiCorp\Vagrant\embedded\bin\gem install ruby-wmi --no-ri --no-rdoc"
cmd /C "set GEM_HOME=C:/HashiCorp/Vagrant/embedded/gems&& C:\HashiCorp\Vagrant\embedded\bin\gem install ruby-wmi --no-ri --no-rdoc"

...but to no avail. I'm scouting for some specific configuration file somewhere that is preventing ruby-wmi from being loaded, but haven't found anything yet.

from vagrant-chef-zero.

joelwilson avatar joelwilson commented on June 25, 2024

For what it's worth, I am also seeing this problem on Windows 7. Vagrant 1.6.5.

from vagrant-chef-zero.

spifrancisv avatar spifrancisv commented on June 25, 2024

Seeing this issue on Windows 8.1 and Vagrant 1.7.2

from vagrant-chef-zero.

miguelaferreira avatar miguelaferreira commented on June 25, 2024

I never used it on windows, but a colleague of mine who did told me that the plugin makes use of the lsof tool to find the process id of chef-zero. AFAIK lsof a unix/linux tool and it is not available on Windows.
It is used here:

pid = %x[ lsof -i tcp:#{port} | grep -E 'ruby|chef-zero' | awk '{print $2}' ]

Now regarding the error @jsmartt posted, it seems the vagrant environment is missing a gem called ruby-wmi. I would expect that vagrant install would pull that in. That should be required to run the plugin on windows, the strange thing is that it was not installed.

The gem install command posted by @cbreden should have installed it.
@cbreden could you please post the output of:

C:\HashiCorp\Vagrant\embedded\bin\gem list

from vagrant-chef-zero.

miguelaferreira avatar miguelaferreira commented on June 25, 2024

ping @electrofelix

Do you have any input regarding this issue?

from vagrant-chef-zero.

miguelaferreira avatar miguelaferreira commented on June 25, 2024

BTW: from the posts of @jsmartt @cbreden you both seem to be running an old version of the plugin. The latest version is v1.0.1

@joelwilson @spifrancisv What versions are you using?

from vagrant-chef-zero.

spifrancisv avatar spifrancisv commented on June 25, 2024
$ vagrant plugin list
vagrant-berkshelf (4.0.4)
vagrant-chef-zero (1.0.1)
vagrant-hostmanager (1.5.0)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.3, system)
vagrant-vbguest (0.10.0)

from vagrant-chef-zero.

ctrl78 avatar ctrl78 commented on June 25, 2024

Hi ,
Same issue for me and same versions

from vagrant-chef-zero.

cbreden avatar cbreden commented on June 25, 2024

Upgraded to 1.0.1 but still have the same issue:

C:\Users\cbreden\Documents\vagrant\c-vbox1\the_commons>vagrant -v
Vagrant 1.7.2

C:\Users\cbreden\Documents\vagrant\c-vbox1\the_commons>vagrant plugin list
vagrant-berkshelf (4.0.4)
vagrant-chef-zero (1.0.1)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.4, system)
vagrant-vcenter (0.3.2)

C:\Users\cbreden\Documents\vagrant\c-vbox1\the_commons>C:\HashiCorp\Vagrant\embedded\bin\gem list

*** LOCAL GEMS ***

bigdecimal (1.2.0)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
ruby-wmi (0.4.0)
test-unit (2.0.0.0)

from vagrant-chef-zero.

miguelaferreira avatar miguelaferreira commented on June 25, 2024

Thanks everyone. I will look into this ASAP (that means probably tomorrow otherwise the day after).

from vagrant-chef-zero.

electrofelix avatar electrofelix commented on June 25, 2024

I believe that there is a second gem required on Windows. I can only assume the following piece of code is not getting properly executed in this case.

# Windows platform requirements to run chef-zero
platforms :mswin, :mingw do
  gem "ruby-wmi"
  gem "win32-service"
end

The list of platforms may not be sufficient, it may be necessary to tweak the list.

Suggest running the following on the system missing the gems.

ruby -e "p RbConfig::CONFIG['host_os']"

May need to go through the various options suggested on http://stackoverflow.com/a/8699106/1597808 to see which gives sensible result.

from vagrant-chef-zero.

cbreden avatar cbreden commented on June 25, 2024

That's a good find!

C:\>ruby -e "p RbConfig::CONFIG['host_os']"
"mingw32"

from vagrant-chef-zero.

miguelaferreira avatar miguelaferreira commented on June 25, 2024

Indeed adding :mingw32 to the Gemfile fixes it for me on Windows 2012 R2.

I will add this to the Gemfile in the repo (via PR), and you guys can install the plugin from source to test:

git clone https://github.com/miguelaferreira/vagrant-chef-zero.git
git checkout -b fix-windows-gem-build origin/fix-windows-gem-build
cd vagrant-chef-zero
gem build .\vagrant-chef-zero.gemspec
vagrant plugin install .\vagrant-chef-zero-1.0.1.gem

Let me know how it works out.

from vagrant-chef-zero.

ctrl78 avatar ctrl78 commented on June 25, 2024

Well done it's working perfectly for me
PS: 06/03/2015 16:46:03>vagrant plugin list
vagrant-berkshelf (4.0.4)
vagrant-chef-zero (1.0.1)

  • Version Constraint: 1.0.1
    vagrant-omnibus (1.4.1)
    vagrant-share (1.1.3, system)
    vagrant-vbguest (0.10.0)

from vagrant-chef-zero.

miguelaferreira avatar miguelaferreira commented on June 25, 2024

It is now broken on non-windows platforms
https://travis-ci.org/schubergphilis/vagrant-chef-zero/builds/65252216

Will work on that before having thePR #73 merged

from vagrant-chef-zero.

miguelaferreira avatar miguelaferreira commented on June 25, 2024

Travis is happy again, we can proceed with merging.
https://travis-ci.org/schubergphilis/vagrant-chef-zero/builds/65365063

from vagrant-chef-zero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.