Ruby Gems

All,

When I am bootstrapping a windows box I get this:

20: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21: # See the License for the specific language governing permissions and
22: # limitations under the License.
23: #
24:
25: if RUBY_PLATFORM =~ /mswin|mingw32|windows/
26: require 'win32/registry’
27>> require 'ruby-wmi’
28: end
29:
30: module Windows
31: module RegistryHelper

Do I need ruby installed on my Windows Image before I can bootstrap it? Should the chef-client install push it out on a bootstrap?

Cheers,
Simon.


Disclaimer

This message is intended only for the use of the person(s) (“Intended Recipient”) to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any dissemination, distribution, copying or other use of this message or any of its content by any person other than the Intended Recipient may constitute a breach of civil or criminal law and is strictly prohibited. If you are not the Intended Recipient, please contact the sender as soon as possible.

Totaljobs Group Limited Registered Office: Bluefin Building, 110 Southwark Street, London, SE1 0TA, UK Registered in England and Wales under company no. 4269861


On Wednesday, March 25, 2015 at 7:54 AM, Simon Hawkins wrote:

All,

When I am bootstrapping a windows box I get this:

20: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21: # See the License for the specific language governing permissions and
22: # limitations under the License.
23: #
24:
25: if RUBY_PLATFORM =~ /mswin|mingw32|windows/
26: require 'win32/registry'
27>> require 'ruby-wmi'
28: end
29:
30: module Windows
31: module RegistryHelper

Do I need ruby installed on my Windows Image before I can bootstrap it? Should the chef-client install push it out on a bootstrap?

Cheers,
Simon.

What cookbook is this from? I seem to remember that chef-client used to include ruby-wmi when installing on windows, but we had some problems with it (something about it not working with certain ruby versions) and weren’t using most of the features so we wrote a replacement for just the features we needed: GitHub - chef/wmi-lite: Lightweight, low-dependency wrapper for basic WMI functionality on Windows.

--
Daniel DeLeo

Hi Daniel,

I think it is this version which causes the error:

windows 1.31.0

I guess I can install wmi-lite on my chef workstation and change the dependency in the windows cookbook?

Cheers,

Simon

-----Original Message-----
From: Daniel DeLeo [mailto:ddeleo@kallistec.com] On Behalf Of Daniel DeLeo
Sent: 25 March 2015 14:59
To: chef@lists.opscode.com
Subject: [chef] Re: Ruby Gems

On Wednesday, March 25, 2015 at 7:54 AM, Simon Hawkins wrote:

All,

When I am bootstrapping a windows box I get this:

20: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21: # See the License for the specific language governing permissions and
22: # limitations under the License.
23: #
24:
25: if RUBY_PLATFORM =~ /mswin|mingw32|windows/
26: require 'win32/registry'
27>> require 'ruby-wmi'
28: end
29:
30: module Windows
31: module RegistryHelper

Do I need ruby installed on my Windows Image before I can bootstrap it? Should the chef-client install push it out on a bootstrap?

Cheers,
Simon.

What cookbook is this from? I seem to remember that chef-client used to include ruby-wmi when installing on windows, but we had some problems with it (something about it not working with certain ruby versions) and weren’t using most of the features so we wrote a replacement for just the features we needed: GitHub - chef/wmi-lite: Lightweight, low-dependency wrapper for basic WMI functionality on Windows.

--
Daniel DeLeo


Disclaimer

This message is intended only for the use of the person(s) ("Intended Recipient") to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any dissemination, distribution, copying or other use of this message or any of its content by any person other than the Intended Recipient may constitute a breach of civil or criminal law and is strictly prohibited. If you are not the Intended Recipient, please contact the sender as soon as possible.

Totaljobs Group Limited Registered Office: Bluefin Building, 110 Southwark Street, London, SE1 0TA, UK Registered in England and Wales under company no. 4269861


On Wednesday, March 25, 2015 at 9:12 AM, Simon Hawkins wrote:

Hi Daniel,

I think it is this version which causes the error:

windows 1.31.0

I guess I can install wmi-lite on my chef workstation and change the dependency in the windows cookbook?

Cheers,

Simon
The wmi-lite gem will be installed automatically when you install chef on windows. Just changing the dependency in the windows cookbook is unlikely to work without further changes to update other code to use wmi-lite and it’s possible that wmi-lite is missing some functionality used by the cookbook. I’ve reached out to my colleagues who are more familiar with the windows cookbook to help answer your question, but for now if you install the ruby-wmi gem it should work around the problem for the time being.

--
Daniel DeLeo

On Wednesday, March 25, 2015 at 11:31 AM, Daniel DeLeo wrote:

On Wednesday, March 25, 2015 at 9:12 AM, Simon Hawkins wrote:

Hi Daniel,

I think it is this version which causes the error:

windows 1.31.0

I guess I can install wmi-lite on my chef workstation and change the dependency in the windows cookbook?

Cheers,

Simon

The wmi-lite gem will be installed automatically when you install chef on windows. Just changing the dependency in the windows cookbook is unlikely to work without further changes to update other code to use wmi-lite and it’s possible that wmi-lite is missing some functionality used by the cookbook. I’ve reached out to my colleagues who are more familiar with the windows cookbook to help answer your question, but for now if you install the ruby-wmi gem it should work around the problem for the time being.

--
Daniel DeLeo

I asked a colleague and he said the version of the cookbook you’re using doesn’t work with current versions of Chef. Looks like the current version is 1.36.6. Can you try using the latest?

--
Daniel DeLeo

Hi Daniel,

Thanks for that. :slight_smile:

When I try and download it (knife download cookbook windows) I get this:

Which version do you want to download?

  1. windows 1.30.2
  2. windows 1.31.0

I assume I have to update my chef-repo to get the latest version?

Cheers,
Simon
-----Original Message-----
From: Daniel DeLeo [mailto:ddeleo@kallistec.com] On Behalf Of Daniel DeLeo
Sent: 25 March 2015 18:35
To: chef@lists.opscode.com
Subject: [chef] Re: RE: Re: Ruby Gems

On Wednesday, March 25, 2015 at 11:31 AM, Daniel DeLeo wrote:

On Wednesday, March 25, 2015 at 9:12 AM, Simon Hawkins wrote:

Hi Daniel,

I think it is this version which causes the error:

windows 1.31.0

I guess I can install wmi-lite on my chef workstation and change the dependency in the windows cookbook?

Cheers,

Simon

The wmi-lite gem will be installed automatically when you install chef on windows. Just changing the dependency in the windows cookbook is unlikely to work without further changes to update other code to use wmi-lite and it’s possible that wmi-lite is missing some functionality used by the cookbook. I’ve reached out to my colleagues who are more familiar with the windows cookbook to help answer your question, but for now if you install the ruby-wmi gem it should work around the problem for the time being.

--
Daniel DeLeo

I asked a colleague and he said the version of the cookbook you’re using doesn’t work with current versions of Chef. Looks like the current version is 1.36.6. Can you try using the latest?

--
Daniel DeLeo


Disclaimer

This message is intended only for the use of the person(s) ("Intended Recipient") to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any dissemination, distribution, copying or other use of this message or any of its content by any person other than the Intended Recipient may constitute a breach of civil or criminal law and is strictly prohibited. If you are not the Intended Recipient, please contact the sender as soon as possible.

Totaljobs Group Limited Registered Office: Bluefin Building, 110 Southwark Street, London, SE1 0TA, UK Registered in England and Wales under company no. 4269861


Hi All,

Don't worry, I downloaded it (chef knowledge is coming back!) :slight_smile:

Cheers,
Simon.

-----Original Message-----
From: Simon Hawkins [mailto:Simon.Hawkins@totaljobsgroup.com]
Sent: 26 March 2015 08:41
To: chef@lists.opscode.com
Subject: [chef] RE: Re: RE: Re: Ruby Gems

Hi Daniel,

Thanks for that. :slight_smile:

When I try and download it (knife download cookbook windows) I get this:

Which version do you want to download?

  1. windows 1.30.2
  2. windows 1.31.0

I assume I have to update my chef-repo to get the latest version?

Cheers,
Simon
-----Original Message-----
From: Daniel DeLeo [mailto:ddeleo@kallistec.com] On Behalf Of Daniel DeLeo
Sent: 25 March 2015 18:35
To: chef@lists.opscode.com
Subject: [chef] Re: RE: Re: Ruby Gems

On Wednesday, March 25, 2015 at 11:31 AM, Daniel DeLeo wrote:

On Wednesday, March 25, 2015 at 9:12 AM, Simon Hawkins wrote:

Hi Daniel,

I think it is this version which causes the error:

windows 1.31.0

I guess I can install wmi-lite on my chef workstation and change the dependency in the windows cookbook?

Cheers,

Simon

The wmi-lite gem will be installed automatically when you install chef on windows. Just changing the dependency in the windows cookbook is unlikely to work without further changes to update other code to use wmi-lite and it’s possible that wmi-lite is missing some functionality used by the cookbook. I’ve reached out to my colleagues who are more familiar with the windows cookbook to help answer your question, but for now if you install the ruby-wmi gem it should work around the problem for the time being.

--
Daniel DeLeo

I asked a colleague and he said the version of the cookbook you’re using doesn’t work with current versions of Chef. Looks like the current version is 1.36.6. Can you try using the latest?

--
Daniel DeLeo


Disclaimer

This message is intended only for the use of the person(s) ("Intended Recipient") to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any dissemination, distribution, copying or other use of this message or any of its content by any person other than the Intended Recipient may constitute a breach of civil or criminal law and is strictly prohibited. If you are not the Intended Recipient, please contact the sender as soon as possible.

Totaljobs Group Limited Registered Office: Bluefin Building, 110 Southwark Street, London, SE1 0TA, UK Registered in England and Wales under company no. 4269861