Chefdk and chruby


#1

Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to chruby so I can switch to it easily. This works great except for the requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the file path since chruby puts all the ruby paths first. I was wondering if anyone had the same setup and what they used to work around it.

Thanks,

David


CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.


#2

I had some issues, David, with gem executables.

See https://dwradcliffe.com/2014/09/19/chefdk-with-rbenv.html

I’d be interested in official advice - the last I saw was on
http://jtimberman.housepub.org/blog/2014/04/30/chefdk-and-ruby/

There is also a ticket somewhere - I posted a comment to David Radcliffe’s
blog with a reference, but my comment has not materialized yet!

Best, Martin

On Wed, Nov 12, 2014 at 11:49 AM, David A. Williams dwilliams@daxko.com
wrote:

Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to
chruby so I can switch to it easily. This works great except for the
requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the
file path since chruby puts all the ruby paths first. I was wondering if
anyone had the same setup and what they used to work around it.

Thanks,

David


CONFIDENTIALITY NOTICE: This electronic mail may contain information that
is privileged, confidential, and/or otherwise protected from disclosure to
anyone other than its intended recipient(s). Any dissemination or use of
this electronic mail or its contents by persons other than the intended
recipient(s) is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by reply
e-mail so that we may correct our internal records. Please then delete the
original message. Thank you.


#3

Direnv might be a better solution to this problem than chruby.

http://direnv.net

On Sun, Nov 16, 2014 at 3:47 PM, Martin Cleaver mrjcleaver2@gmail.com
wrote:

I had some issues, David, with gem executables.

See https://dwradcliffe.com/2014/09/19/chefdk-with-rbenv.html

I’d be interested in official advice - the last I saw was on
http://jtimberman.housepub.org/blog/2014/04/30/chefdk-and-ruby/

There is also a ticket somewhere - I posted a comment to David Radcliffe’s
blog with a reference, but my comment has not materialized yet!

Best, Martin

On Wed, Nov 12, 2014 at 11:49 AM, David A. Williams dwilliams@daxko.com
wrote:

Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to
chruby so I can switch to it easily. This works great except for the
requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the
file path since chruby puts all the ruby paths first. I was wondering if
anyone had the same setup and what they used to work around it.

Thanks,

David


CONFIDENTIALITY NOTICE: This electronic mail may contain information that
is privileged, confidential, and/or otherwise protected from disclosure to
anyone other than its intended recipient(s). Any dissemination or use of
this electronic mail or its contents by persons other than the intended
recipient(s) is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by reply
e-mail so that we may correct our internal records. Please then delete the
original message. Thank you.


#4

I ended up hacking shrub’s auto function. Not great but it will work for now.

David Williams
From: Booker Bense <bbense@gmail.commailto:bbense@gmail.com>
Reply-To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Date: Tuesday, November 18, 2014 at 9:23 AM
To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Subject: [chef] Re: Re: chefdk and chruby

Direnv might be a better solution to this problem than chruby.

http://direnv.net

On Sun, Nov 16, 2014 at 3:47 PM, Martin Cleaver <mrjcleaver2@gmail.commailto:mrjcleaver2@gmail.com> wrote:
I had some issues, David, with gem executables.

See https://dwradcliffe.com/2014/09/19/chefdk-with-rbenv.html

I’d be interested in official advice - the last I saw was on http://jtimberman.housepub.org/blog/2014/04/30/chefdk-and-ruby/

There is also a ticket somewhere - I posted a comment to David Radcliffe’s blog with a reference, but my comment has not materialized yet!

Best, Martin

On Wed, Nov 12, 2014 at 11:49 AM, David A. Williams <dwilliams@daxko.commailto:dwilliams@daxko.com> wrote:
Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to chruby so I can switch to it easily. This works great except for the requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the file path since chruby puts all the ruby paths first. I was wondering if anyone had the same setup and what they used to work around it.

Thanks,

David


CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.


CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.


#5

Can you share your approach please? Thanks, M.

On Wed, Nov 19, 2014 at 8:49 AM, David A. Williams dwilliams@daxko.com
wrote:

I ended up hacking shrub’s auto function. Not great but it will work
for now.

David Williams
From: Booker Bense bbense@gmail.com
Reply-To: "chef@lists.opscode.com" chef@lists.opscode.com
Date: Tuesday, November 18, 2014 at 9:23 AM
To: "chef@lists.opscode.com" chef@lists.opscode.com
Subject: [chef] Re: Re: chefdk and chruby

Direnv might be a better solution to this problem than chruby.

http://direnv.net

On Sun, Nov 16, 2014 at 3:47 PM, Martin Cleaver mrjcleaver2@gmail.com
wrote:

I had some issues, David, with gem executables.

See https://dwradcliffe.com/2014/09/19/chefdk-with-rbenv.html

I’d be interested in official advice - the last I saw was on
http://jtimberman.housepub.org/blog/2014/04/30/chefdk-and-ruby/

There is also a ticket somewhere - I posted a comment to David
Radcliffe’s blog with a reference, but my comment has not materialized yet!

Best, Martin

On Wed, Nov 12, 2014 at 11:49 AM, David A. Williams dwilliams@daxko.com
wrote:

Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to
chruby so I can switch to it easily. This works great except for the
requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the
file path since chruby puts all the ruby paths first. I was wondering if
anyone had the same setup and what they used to work around it.

Thanks,

David


CONFIDENTIALITY NOTICE: This electronic mail may contain information
that is privileged, confidential, and/or otherwise protected from
disclosure to anyone other than its intended recipient(s). Any
dissemination or use of this electronic mail or its contents by persons
other than the intended recipient(s) is strictly prohibited. If you have
received this communication in error, please notify the sender immediately
by reply e-mail so that we may correct our internal records. Please then
delete the original message. Thank you.


CONFIDENTIALITY NOTICE: This electronic mail may contain information that
is privileged, confidential, and/or otherwise protected from disclosure to
anyone other than its intended recipient(s). Any dissemination or use of
this electronic mail or its contents by persons other than the intended
recipient(s) is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by reply
e-mail so that we may correct our internal records. Please then delete the
original message. Thank you.


#6

Martin,

Here’s a gist https://gist.github.com/dawilliams/1674b7d7744d95c1b781

I basically added the chefdk function and called it from chruby_auto function. Look for “## Added” comments

Thanks,

David Williams

From: Martin Cleaver <mrjcleaver2@gmail.commailto:mrjcleaver2@gmail.com>
Reply-To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Date: Thursday, November 20, 2014 at 9:33 AM
To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Subject: [chef] Re: Re: Re: Re: chefdk and chruby

Can you share your approach please? Thanks, M.

On Wed, Nov 19, 2014 at 8:49 AM, David A. Williams <dwilliams@daxko.commailto:dwilliams@daxko.com> wrote:
I ended up hacking shrub’s auto function. Not great but it will work for now.

David Williams
From: Booker Bense <bbense@gmail.commailto:bbense@gmail.com>
Reply-To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Date: Tuesday, November 18, 2014 at 9:23 AM
To: "chef@lists.opscode.commailto:chef@lists.opscode.com" <chef@lists.opscode.commailto:chef@lists.opscode.com>
Subject: [chef] Re: Re: chefdk and chruby

Direnv might be a better solution to this problem than chruby.

http://direnv.net

On Sun, Nov 16, 2014 at 3:47 PM, Martin Cleaver <mrjcleaver2@gmail.commailto:mrjcleaver2@gmail.com> wrote:
I had some issues, David, with gem executables.

See https://dwradcliffe.com/2014/09/19/chefdk-with-rbenv.html

I’d be interested in official advice - the last I saw was on http://jtimberman.housepub.org/blog/2014/04/30/chefdk-and-ruby/

There is also a ticket somewhere - I posted a comment to David Radcliffe’s blog with a reference, but my comment has not materialized yet!

Best, Martin

On Wed, Nov 12, 2014 at 11:49 AM, David A. Williams <dwilliams@daxko.commailto:dwilliams@daxko.com> wrote:
Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to chruby so I can switch to it easily. This works great except for the requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the file path since chruby puts all the ruby paths first. I was wondering if anyone had the same setup and what they used to work around it.

Thanks,

David


CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.


CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.


CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.


#7

Thanks David,

So, Daniel has now posted my comment - leading back to

I’ll link that back to here.

On Thu, Nov 20, 2014 at 11:02 AM, David A. Williams dwilliams@daxko.com
wrote:

Martin,

Here’s a gist https://gist.github.com/dawilliams/1674b7d7744d95c1b781

I basically added the chefdk function and called it from chruby_auto
function. Look for “## Added” comments

Thanks,

David Williams

From: Martin Cleaver mrjcleaver2@gmail.com
Reply-To: "chef@lists.opscode.com" chef@lists.opscode.com
Date: Thursday, November 20, 2014 at 9:33 AM
To: "chef@lists.opscode.com" chef@lists.opscode.com
Subject: [chef] Re: Re: Re: Re: chefdk and chruby

Can you share your approach please? Thanks, M.

On Wed, Nov 19, 2014 at 8:49 AM, David A. Williams dwilliams@daxko.com
wrote:

I ended up hacking shrub’s auto function. Not great but it will work
for now.

David Williams
From: Booker Bense bbense@gmail.com
Reply-To: "chef@lists.opscode.com" chef@lists.opscode.com
Date: Tuesday, November 18, 2014 at 9:23 AM
To: "chef@lists.opscode.com" chef@lists.opscode.com
Subject: [chef] Re: Re: chefdk and chruby

Direnv might be a better solution to this problem than chruby.

http://direnv.net

On Sun, Nov 16, 2014 at 3:47 PM, Martin Cleaver mrjcleaver2@gmail.com
wrote:

I had some issues, David, with gem executables.

See https://dwradcliffe.com/2014/09/19/chefdk-with-rbenv.html

I’d be interested in official advice - the last I saw was on
http://jtimberman.housepub.org/blog/2014/04/30/chefdk-and-ruby/

There is also a ticket somewhere - I posted a comment to David
Radcliffe’s blog with a reference, but my comment has not materialized yet!

Best, Martin

On Wed, Nov 12, 2014 at 11:49 AM, David A. Williams <dwilliams@daxko.com

wrote:

Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to
chruby so I can switch to it easily. This works great except for the
requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the
file path since chruby puts all the ruby paths first. I was wondering if
anyone had the same setup and what they used to work around it.

Thanks,

David


CONFIDENTIALITY NOTICE: This electronic mail may contain information
that is privileged, confidential, and/or otherwise protected from
disclosure to anyone other than its intended recipient(s). Any
dissemination or use of this electronic mail or its contents by persons
other than the intended recipient(s) is strictly prohibited. If you have
received this communication in error, please notify the sender immediately
by reply e-mail so that we may correct our internal records. Please then
delete the original message. Thank you.


CONFIDENTIALITY NOTICE: This electronic mail may contain information that
is privileged, confidential, and/or otherwise protected from disclosure to
anyone other than its intended recipient(s). Any dissemination or use of
this electronic mail or its contents by persons other than the intended
recipient(s) is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by reply
e-mail so that we may correct our internal records. Please then delete the
original message. Thank you.


CONFIDENTIALITY NOTICE: This electronic mail may contain information that
is privileged, confidential, and/or otherwise protected from disclosure to
anyone other than its intended recipient(s). Any dissemination or use of
this electronic mail or its contents by persons other than the intended
recipient(s) is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by reply
e-mail so that we may correct our internal records. Please then delete the
original message. Thank you.


#8

Can you just run eval "$(chef shell-init SHELL_NAME)” in your shell to enable ChefDK for your current session? Are there things that don’t work if you do that?

I use rbenv for development but run the above to test ChefDK and haven’t had any trouble.


Daniel DeLeo

On Thursday, November 20, 2014 at 8:31 AM, Martin Cleaver wrote:

Thanks David,

So, Daniel has now posted my comment - leading back to https://github.com/opscode/chef-dk/issues/16

I’ll link that back to here.

On Thu, Nov 20, 2014 at 11:02 AM, David A. Williams <dwilliams@daxko.com (mailto:dwilliams@daxko.com)> wrote:

Martin,

Here’s a gist https://gist.github.com/dawilliams/1674b7d7744d95c1b781

I basically added the chefdk function and called it from chruby_auto function. Look for “## Added” comments

Thanks,

David Williams

From: Martin Cleaver <mrjcleaver2@gmail.com (mailto:mrjcleaver2@gmail.com)>
Reply-To: "chef@lists.opscode.com (mailto:chef@lists.opscode.com)" <chef@lists.opscode.com (mailto:chef@lists.opscode.com)>
Date: Thursday, November 20, 2014 at 9:33 AM
To: "chef@lists.opscode.com (mailto:chef@lists.opscode.com)" <chef@lists.opscode.com (mailto:chef@lists.opscode.com)>
Subject: [chef] Re: Re: Re: Re: chefdk and chruby

Can you share your approach please? Thanks, M.

On Wed, Nov 19, 2014 at 8:49 AM, David A. Williams <dwilliams@daxko.com (mailto:dwilliams@daxko.com)> wrote:

I ended up hacking shrub’s auto function. Not great but it will work for now.

David Williams
From: Booker Bense <bbense@gmail.com (mailto:bbense@gmail.com)>
Reply-To: "chef@lists.opscode.com (mailto:chef@lists.opscode.com)" <chef@lists.opscode.com (mailto:chef@lists.opscode.com)>
Date: Tuesday, November 18, 2014 at 9:23 AM
To: "chef@lists.opscode.com (mailto:chef@lists.opscode.com)" <chef@lists.opscode.com (mailto:chef@lists.opscode.com)>
Subject: [chef] Re: Re: chefdk and chruby

Direnv might be a better solution to this problem than chruby.

http://direnv.net

On Sun, Nov 16, 2014 at 3:47 PM, Martin Cleaver <mrjcleaver2@gmail.com (mailto:mrjcleaver2@gmail.com)> wrote:

I had some issues, David, with gem executables.

See https://dwradcliffe.com/2014/09/19/chefdk-with-rbenv.html

I’d be interested in official advice - the last I saw was on http://jtimberman.housepub.org/blog/2014/04/30/chefdk-and-ruby/

There is also a ticket somewhere - I posted a comment to David Radcliffe’s blog with a reference, but my comment has not materialized yet!

Best, Martin

On Wed, Nov 12, 2014 at 11:49 AM, David A. Williams <dwilliams@daxko.com (mailto:dwilliams@daxko.com)> wrote:

Hello All,

I’m using chruby and chefdk on my mac. I’ve added chefdk’s ruby to chruby so I can switch to it easily. This works great except for the requirement to have /opt/chedk/bin before /opt/chefdk/embedded/bin in the file path since chruby puts all the ruby paths first. I was wondering if anyone had the same setup and what they used to work around it.

Thanks,

David
CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.

CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.

CONFIDENTIALITY NOTICE: This electronic mail may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic mail or its contents by persons other than the intended recipient(s) is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail so that we may correct our internal records. Please then delete the original message. Thank you.