Skip to content

Instantly share code, notes, and snippets.

@thehar
Forked from asnodgrass/chefdk-rvm.sh
Last active September 29, 2018 01:26
Show Gist options
  • Save thehar/5aafc3a8261d269e6f26ae472799e468 to your computer and use it in GitHub Desktop.
Save thehar/5aafc3a8261d269e6f26ae472799e468 to your computer and use it in GitHub Desktop.
Making ChefDK work with RVM
brew cask install chef/chef/chefdk
CHEFDK="/opt/chefdk/embedded"
CHEFDK_USER="$HOME/.chefdk/gem/ruby/2.5.0"
RVM_GEMS="$HOME/.rvm/gems"
RVM_RUBIES="$HOME/.rvm/rubies"
RUBY_NAME="ext-chefdk-ruby"
mkdir -p $RVM_RUBIES/$RUBY_NAME
ln -s $CHEFDK/bin $RVM_RUBIES/$RUBY_NAME
ln -s $CHEFDK_USER $RVM_GEMS/$RUBY_NAME
ln -s \$CHEFDK/lib/ruby/gems/2.5.0 $RVM_GEMS/$RUBY_NAME\@global
rvm alias create chefdk $RUBY_NAME
rvm use chefdk --default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment