2015-01-17 1 views
2

내가이요리사 윈도우 -의 실패는

chef_gem 'aws-sdk' 
require 'aws-sdk' 

요리사 보석 'AWS-SDK'처럼 창에 내 요리사의 레시피 AWS-SDK 보석을 설치하고 성공적으로 설치됩니다 차단할 필요하지만 오류에 던졌습니다

require 'aws-sdk' 

오류는 LoadError - cannot load such file --- aws-sdk입니다. 내가하고있는 일은 여기에있다. 주방장이 작성한 전체 출력은 다음과 같습니다

[2015-01-18T05:13:38+00:00] INFO: Running start handlers 
[2015-01-18T05:13:38+00:00] INFO: Start handlers complete. 
[2015-01-18T05:13:38+00:00] WARN: found a directory attributes in the cookbook path, but it contains no cookbook files. skipping. 
[2015-01-18T05:13:38+00:00] WARN: found a directory definitions in the cookbook path, but it contains no cookbook files. skipping. 
[2015-01-18T05:13:38+00:00] WARN: found a directory files in the cookbook path, but it contains no cookbook files. skipping. 
[2015-01-18T05:13:39+00:00] INFO: Processing chef_gem[aws-sdk] action install (set_up_machine::default line 31) 

================================================================================ 
Recipe Compile Error in C:\Users\Administrator\Desktop\wincookbook\set_up_machine\recipes\default.rb 
================================================================================ 

    LoadError 
    --------- 
    cannot load such file -- aws-sdk 

    Cookbook Trace: 
    --------------- 
     C:/opscode/chef/embedded/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require' 
     C:/opscode/chef/embedded/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require' 
     C:\Users\Administrator\Desktop\wincookbook\set_up_machine\recipes\default.rb:31:in `from_file' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in `instance_eval' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in `from_file' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/cookbook_version.rb:245:in `load_recipe' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/run_context.rb:169:in `load_recipe' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:140:in `block in compile_recipes' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:138:in `each' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:138:in `compile_recipes' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:75:in `compile' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/run_context.rb:92:in `load' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/policy_builder/expand_node_object.rb:73:in `setup_run_context' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/client.rb:235:in `setup_run_context' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/client.rb:397:in `run' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:243:in `run_with_graceful_exit_option' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:220:in `block in run_chef_client' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/local_mode.rb:38:in `with_server_connectivity' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:201:in `run_chef_client' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:245:in `block in interval_run_chef_client' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:234:in `loop' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:234:in `interval_run_chef_client' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:224:in `run_application' 
     C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:58:in `run' 
     C:/opscode/chef/embedded/apps/chef/bin/chef-solo:25:in `<top (required)>' 
     C:/opscode/chef/bin/chef-solo:52:in `load' 
     C:/opscode/chef/bin/chef-solo:52:in `<main>' 

    Relevant File Content: 
    ---------------------- 
    C:/opscode/chef/embedded/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb: 

    47:  end 
    48: 
    49:  # If there are no unresolved deps, then we can use just try 
    50:  # normal require handle loading a gem from the rescue below. 
    51: 
    52:  if Gem::Specification.unresolved_deps.empty? then 
    53:  RUBYGEMS_ACTIVATION_MONITOR.exit 
    54>>  return gem_original_require(path) 
    55:  end 
    56: 
    57:  # If +path+ is for a gem that has already been loaded, don't 
    58:  # bother trying to find it in an unresolved gem, just go straight 
    59:  # to normal require. 
    60:  #-- 
    61:  # TODO request access to the C implementation of this to speed up RubyGems 
    62: 
    63:  spec = Gem::Specification.stubs.find { |s| 
+0

chef-client의 전체 출력을 포함하십시오. – coderanger

+0

요리사 - 클라이언트 – user27111987

+0

에서 전체 출력을 추가했습니다. 위의 내용이 많으므로 _all_ 출력을 포함하십시오. – coderanger

답변

0

시스템에서 루비가 충돌하여 운이 좋지 않습니다. 당신의 2.1 가리키는

루비 2.1 설치가 아마 설정 한 일부 envrionment 변수 (GEM_PATH를 같은) 때 요리사 실행하므로, 설치하고 보석의 대상이 재정의되어 자신의 gem install의 호출하지만 당신은 조리법에서 그것을 필요로 할 때 요리사가 루비 문맥을 포함하고있어 자신의 경로이기 때문에 찾을 수 없습니다. irb 테스트에서도 마찬가지입니다. 이런 상황에 대한

나는 그것은 작은 실패에 때때로 방법을 시도있어 환경을 비우 만 ENV가 필요 바르 설정 래퍼 .cmd (PATH, SSL_CERT_FILE, USERNAME을, 등)

을하는 경향이 어떤 ENV var가 필요한지 결정하지만 결국에는 사용하는 것에 대해 확신합니다.