Comments (11)
each bin wrappers have this code:
ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
so it may help to set APPBUNDLER_ALLOW_RVM=true
and then override $GEM_HOME
from chef-dk.
and the above seems to be related to appbundler: https://github.com/opscode/appbundler#rvm
from chef-dk.
Yeah, the binaries need to be rvm resistant, and APPBUNDLER_ALLOW_RVM=true
is just a hack we use for travis (which uses rvm). But this should be pretty easy to do. Probably best to put user-installed gems in your home directory somewhere.
from chef-dk.
We should consider writing gems to something like ~/.chefdk.d/gems
. This is similar to how Vagrant works:
➜ ls -la ~/.vagrant.d/gems/
total 0
drwxr-xr-x 8 schisamo staff 272 Mar 11 13:55 .
drwxr-xr-x 12 schisamo staff 408 Apr 22 14:06 ..
drwxr-xr-x 7 schisamo staff 238 Mar 17 06:39 build_info
drwxr-xr-x 7 schisamo staff 238 Mar 17 06:39 cache
drwxr-xr-x 2 schisamo staff 68 Mar 11 13:55 doc
drwxr-xr-x 7 schisamo staff 238 Mar 17 06:39 gems
drwxr-xr-x 3 schisamo staff 102 Mar 11 13:53 ruby
drwxr-xr-x 7 schisamo staff 238 Mar 17 06:39 specifications
A ~/.chefdk.d
directory would also give us a staging area for other required directories/assets.
from chef-dk.
@schisamo working on that right now
from chef-dk.
from chef-dk.
Would it make sense to just use ~/.chef/gems
?
from chef-dk.
Merged a fix to omnibus-chef: chef-boneyard/omnibus-chef@af1f058 This will be fixed in the next chefdk release.
from chef-dk.
@danielsdeleo -
from chef-dk.
This exactly happens again in version 0.8.0 on OSX El Capitan
from chef-dk.
I occurred the same problem when use kitchen, it tries to write /opt/chefdk/embedded/lib/ruby/gems/2.1.0
instead of .chefdk/gem/ruby/2.1.0
.
$ kitchen init
identical .kitchen.yml
identical chefignore
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /opt/chefdk/embedded/lib/ruby/gems/2.1.0 directory.
My environment:
$ sw_vers -productVersion
10.11.2
$ chef gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.8
- RUBY VERSION: 2.1.6 (2015-04-13 patchlevel 336) [x86_64-darwin12.0]
- INSTALLATION DIRECTORY: /opt/chefdk/embedded/lib/ruby/gems/2.1.0
- RUBY EXECUTABLE: /opt/chefdk/embedded/bin/ruby
- EXECUTABLE DIRECTORY: /opt/chefdk/embedded/bin
- SPEC CACHE DIRECTORY: /Users/tonytonyjan/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /opt/chefdk/embedded/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /opt/chefdk/embedded/lib/ruby/gems/2.1.0
- /Users/tonytonyjan/.chefdk/gem/ruby/2.1.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "-N"
- "update" => "-N"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/tonytonyjan/.pyenv/shims
- /Users/tonytonyjan/.rbenv/shims
- /Users/tonytonyjan/.pyenv/shims
- /Users/tonytonyjan/.rbenv/shims
- /Users/tonytonyjan/bin
- /Users/tonytonyjan/.pyenv/shims
- /Users/tonytonyjan/.rbenv/shims
- /usr/local/sbin
- ./node_modules/.bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /opt/X11/bin
- /usr/texbin
from chef-dk.
Related Issues (20)
- Gemfile.lock in Working Directory Causes Bundler version error HOT 3
- inspec bug in chefdk 4.4.14 HOT 10
- Omnibus and Hab appbundling are not the same HOT 1
- Dependabot can't resolve your Ruby dependency files HOT 2
- Dependabot can't resolve your Ruby dependency files HOT 2
- Improve test execution times with a pre-warmed docker image HOT 1
- Ship DK 3 for Oct HOT 1
- Ship DK 4 for Oct HOT 1
- Release DK 3 to resolve libxslt CVE HOT 1
- Cookbook generators failed to generate new cookbooks -- undefined method `metadata' HOT 2
- Release Chef-DK 4.6 HOT 1
- Release DK for December HOT 1
- policyfile checksum keeps changing HOT 2
- Your .dependabot/config.yml contained invalid details HOT 1
- Release DK for Feb HOT 1
- Fix ChefDK 3 build pipeline
- DK release notes are not up to date on docs.chef.io HOT 2
- Any Documentation/script to remove chefdk from linux system? HOT 4
- Generate Policyfile.lock.json without Kitchen Test HOT 1
- Running chef-zero/chef-solo on chef server itself.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-dk.