문제

I am using Chef-solo for my provision infrastructure.

Well I was interested in change the chef gem source repository to my local repository. I did it with these commands:

/opt/chef/embedded/bin/gem sources -r http://rubygems.org/

/opt/chef/embedded/bin/gem sources -a http://gems.localserver/

But now I want to know:

Where chef put its current gem source??

Is there something like a .gemrc for chef?

Thanks.

도움이 되었습니까?

해결책 2

If you use the gem inside /opt/chef/embedded/bin/gem to install things, it stores them by default on the local file system in

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems

As to whether using this gem utility is wise or not, @sethvargo certainly knows more about chef than me, but I've been using it to install "chef" related things like test-kitchen and so far so good.

You certainly need to be a bit careful with this since you can easily break chef with the wrong gems. But it's very handy to have a single ruby path with all the chef goodies installed for testing and development.

다른 팁

the gemrc for chefs embedded gem is /opt/chef/embedded/etc/gemrc

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top