ruby安装失败使用厨师

时间:2015-05-04 03:23:32

标签: rvm chef-recipe knife-solo

引导这样的节点:“knife solo cook username@servername

运行列表包含此配方rubies.rb

include_recipe 'rvm::system'
include_recipe 'rvm::gem_package'

rvm_gem "bundler" do
  ruby_string "ruby-2.1.1"
  action      :install
end

以下是我失败的原因。

  * execute[Add bundler to /opt/mount1/rvm/gemsets/global.gems] action nothing (skipped due to action :nothing)
  * group[rvm] action create (skipped due to only_if)
Recipe: project_jenkins::rubies
  * rvm_gem[bundler] action install

    ================================================================================
    Error executing action `install` on resource 'rvm_gem[bundler]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '2'
    ---- Begin output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
    STDOUT: 
    STDERR: Ruby ruby-2.1.1 is not installed.
    ---- End output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
    Ran bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" returned 2

    Cookbook Trace:
    ---------------
    /home/user/chef-solo/cookbooks-2/rvm/libraries/rvm_rubygems_package.rb:63:in `gem_paths'

    Resource Declaration:
    ---------------------
    # In /home/user/chef-solo/cookbooks-2/project_jenkins/recipes/rubies.rb

      4: rvm_gem "bundler" do
      5:   ruby_string "ruby-2.1.1"
      6:   action      :install
      7: end

    Compiled Resource:
    ------------------
    # Declared in /home/user/chef-solo/cookbooks-2/project_jenkins/recipes/rubies.rb:4:in `from_file'

    rvm_gem("bundler") do
      provider Chef::Provider::Package::RVMRubygems
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :rvm_gem
      cookbook_name :"project_jenkins"
      recipe_name "rubies"
      ruby_string "ruby-2.1.1"
      gem_binary "gem"
      package_name "bundler"
    end


Running handlers:
[2015-05-03T22:50:33-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-05-03T22:50:33-04:00] ERROR: Exception handlers complete
[2015-05-03T22:50:33-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 28 resources updated in 603.016790952 seconds
[2015-05-03T22:50:33-04:00] ERROR: rvm_gem[bundler] (project_jenkins::rubies line 4) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
STDOUT: 
STDERR: Ruby ruby-2.1.1 is not installed.
---- End output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" ----
Ran bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem env gempath" returned 2
[2015-05-03T22:50:33-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.

chef-client的版本没关系,我尝试从11.16.4升级厨师12.3.0。 rvm食谱版:“0.9.2” 该平台是CentOS6.6

0 个答案:

没有答案