1

I've installed ChefDK on my machine (windows 7). I needed to use the embedded ruby as my system ruby, so I came across this command:

echo 'eval "$(chef shell-init bash)"' >> ~/.bash_profile

I ran this. It seems to have updated my system ruby to ChefDK's ruby. But now, Git bash isn't working. Any command I run I get the response: bash: git: command not found

Is there some change I need to make in my environment variables to fix this?

Holger Just
  • 52,918
  • 14
  • 115
  • 123
user1097108
  • 345
  • 1
  • 4
  • 15

1 Answers1

1

I found this Chef Blog Posting, The ChefDK on Windows Survival Guide

The post clearly states,

NOTE: The only Windows shell officially supported and recommended by Chef is Powershell. Use Bash at your own risk

As a mitigation, there is a provided solution,

Set the following in your bash profile: ( Updated for more recent ChefDK )

RUBY_VERSION="2.3.0" export PATH="${PATH}:${HOME}/AppData/Local/chefdk/gem/ruby/${RUBY_VERSION}/bin:/c/opscode/chefdk/embedded/bin" export GEM_ROOT="/c/opscode/chefdk/embedded/lib/ruby/gems/${RUBY_VERSION}" export GEM_HOME="${HOME}/AppData/Local/chefdk/gem/ruby/${RUBY_VERSION}" export GEM_PATH="/c/opscode/chefdk/embedded/lib/ruby/gems/${RUBY_VERSION}"

grbonk
  • 609
  • 6
  • 22