Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

0.7.0, gems in user install not showing up: #443

Closed
btm opened this issue Jun 29, 2015 · 0 comments
Closed

0.7.0, gems in user install not showing up: #443

btm opened this issue Jun 29, 2015 · 0 comments

Comments

@btm
Copy link
Contributor

btm commented Jun 29, 2015

@jaym, something is having a hard time with backslashes. I found this debugging #411

From chef gem env:

  - GEM PATHS:
     - C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0
     - C:\Users\btm_000\AppData\Local/chefdk/gem/ruby/2.1.0

If we change C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/defaults/operating_system.rb as below, this fixes chef gem list and chef exec knife windows cert generate for the circumstance where knife doesn't find the gem in the user-install directory.

$ diff chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/defaults/operating_system.rb ~/src/omnibus-chef/files/rubygems-custom ization/windows/operating_system.rb
27c27
<                      File.join(ENV['LOCALAPPDATA'], 'chefdk').gsub(/\\/, '/')

---
>                      File.join(ENV['LOCALAPPDATA'], 'chefdk')

I'm suspecting the rubygems try_activate error is related but you have to have a ~/.chefdk directory to repro it, which I've deleted during this testing process. I'm going to recreate it and go back for another test run now.


Repro output for fix below:

# install chefdk 0.7 nightly
PS C:\Users\btm_000> chef gem list knife-windows

*** LOCAL GEMS ***

knife-windows (0.8.5)
PS C:\Users\btm_000> chef gem install knife-windows -v 1.0.0.rc.1
Fetching: winrm-s-0.3.0.gem (100%)
WARNING:  You don't have c:\users\btm_000\appdata\local\chefdk\gem\ruby\2.1.0\bin in your PATH,
          gem executables will not run.
Successfully installed winrm-s-0.3.0
Fetching: knife-windows-1.0.0.rc.1.gem (100%)
Successfully installed knife-windows-1.0.0.rc.1
Parsing documentation for winrm-s-0.3.0
Installing ri documentation for winrm-s-0.3.0
Parsing documentation for knife-windows-1.0.0.rc.1
Installing ri documentation for knife-windows-1.0.0.rc.1
Done installing documentation for winrm-s, knife-windows after 1 seconds
2 gems installed
PS C:\Users\btm_000> chef gem list knife-windows

*** LOCAL GEMS ***

knife-windows (0.8.5)
PS C:\Users\btm_000> chef gem uninstall knife-windows -v 0.8.5
Successfully uninstalled knife-windows-0.8.5
PS C:\Users\btm_000> chef gem list knife-windows

*** LOCAL GEMS ***


###
### patch C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/defaults/operating_system.rb
###
PS C:\Users\btm_000> chef gem list knife-windows

*** LOCAL GEMS ***

knife-windows (1.0.0.rc.1)
jaym added a commit to chef-boneyard/omnibus-chef that referenced this issue Jul 2, 2015
ksubrama pushed a commit that referenced this issue Jan 11, 2016
MSI signing configuration for Chef Client and Chef DK.
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant