I've been trying for quite a bunch of hours now and I simply cannot figure out how this works. I'm trying to get a user install going for my deployer
user. I would like to install jruby-1.6.7
and the jruby-openssl
gem. I would like to set jruby-1.6.7 as the global/default ruby.
[Mon, 09 Apr 2012 07:57:25 -0700] INFO: *** Chef 0.10.8 ***
[Mon, 09 Apr 2012 07:57:25 -0700] INFO: Setting the run_list to ["recipe[main]"] from JSON
[Mon, 09 Apr 2012 07:57:25 -0700] INFO: Run List is [recipe[main]]
[Mon, 09 Apr 2012 07:57:25 -0700] INFO: Run List expands to [main]
[Mon, 09 Apr 2012 07:57:25 -0700] INFO: Starting Chef Run for lucid32
[Mon, 09 Apr 2012 07:57:25 -0700] INFO: Running start handlers
[Mon, 09 Apr 2012 07:57:25 -0700] INFO: Start handlers complete.
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[curl] action install (main::default line 3)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[git-core] action install (main::default line 3)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[htop] action install (main::default line 3)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[vim] action install (main::default line 3)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing ruby_block[set-env-java-home] action create (java::openjdk line 36)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: ruby_block[set-env-java-home] called
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing ruby_block[update-java-alternatives] action nothing (java::openjdk line 43)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[openjdk-6-jdk] action install (java::openjdk line 79)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[tar] action install (ruby_build::default line 34)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[bash] action install (ruby_build::default line 34)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[curl] action install (ruby_build::default line 34)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[git-core] action install (ruby_build::default line 34)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing execute[Install ruby-build] action nothing (ruby_build::default line 38)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing directory[/tmp/chef-solo] action create (ruby_build::default line 48)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing git[/tmp/chef-solo/ruby-build] action checkout (ruby_build::default line 52)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[git-core] action install (rbenv::user_install line 43)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[grep] action install (rbenv::user_install line 43)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing user[deployer] action create (main::default line 15)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing rbenv_ruby[jruby-1.6.7] (deployer) action install (main::default line 23)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[g++] action install (/tmp/chef-solo/cookbooks/rbenv/providers/ruby.rb line 95)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Building rbenv_ruby[jruby-1.6.7] (deployer), this could take a while...
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing rbenv_script[rbenv install jruby-1.6.7 (deployer)] action run (/tmp/chef-solo/cookbooks/rbenv/providers/ruby.rb line 59)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing package[g++] action nothing (/tmp/chef-solo/cookbooks/rbenv/providers/ruby.rb line 95)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing rbenv_script[rbenv install jruby-1.6.7 (deployer)] action nothing (/tmp/chef-solo/cookbooks/rbenv/providers/ruby.rb line 59)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: Processing script[rbenv install jruby-1.6.7 (deployer)] action run (/tmp/chef-solo/cookbooks/rbenv/providers/script.rb line 28)
[Mon, 09 Apr 2012 07:57:26 -0700] INFO: script[rbenv install jruby-1.6.7 (deployer)] sh("bash" "/tmp/chef-script20120409-8817-1y28ets-0")
[Mon, 09 Apr 2012 07:57:26 -0700] ERROR: script[rbenv install jruby-1.6.7 (deployer)] (/tmp/chef-solo/cookbooks/rbenv/providers/script.rb line 28) has had an error
[Mon, 09 Apr 2012 07:57:26 -0700] ERROR: script[rbenv install jruby-1.6.7 (deployer)] (/tmp/chef-solo/cookbooks/rbenv/providers/script.rb:28:in `class_from_file') had an error:
script[rbenv install jruby-1.6.7 (deployer)] (/tmp/chef-solo/cookbooks/rbenv/providers/script.rb line 28) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '127'
---- Begin output of "bash" "/tmp/chef-script20120409-8817-1y28ets-0" ----
STDOUT:
STDERR: /tmp/chef-script20120409-8817-1y28ets-0: line 3: rbenv: command not found
/tmp/chef-script20120409-8817-1y28ets-0: line 5: rbenv: command not found
/tmp/chef-script20120409-8817-1y28ets-0: line 7: rbenv: command not found
---- End output of "bash" "/tmp/chef-script20120409-8817-1y28ets-0" ----
Ran "bash" "/tmp/chef-script20120409-8817-1y28ets-0" returned 127
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/shell_out.rb:206:in `invalid!'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/shell_out.rb:192:in `error!'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/shell_out.rb:36:in `shell_out!'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/execute.rb:58:in `action_run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/script.rb:33:in `action_run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource.rb:440:in `send'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource.rb:440:in `run_action'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:45:in `run_action'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:81:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection.rb:94
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/runner.rb:76:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:312:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:160:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/solo.rb:192:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/solo.rb:183:in `loop'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/solo.rb:183:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/chef-solo:25
/usr/bin/chef-solo:19:in `load'
/usr/bin/chef-solo:19
[Mon, 09 Apr 2012 07:57:26 -0700] ERROR: Running exception handlers
[Mon, 09 Apr 2012 07:57:26 -0700] ERROR: Exception handlers complete
[Mon, 09 Apr 2012 07:57:26 -0700] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
[Mon, 09 Apr 2012 07:57:26 -0700] FATAL: Chef::Exceptions::ShellCommandFailed: script[rbenv install jruby-1.6.7 (deployer)] (/tmp/chef-solo/cookbooks/rbenv/providers/script.rb line 28) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '127'
---- Begin output of "bash" "/tmp/chef-script20120409-8817-1y28ets-0" ----
STDOUT:
STDERR: /tmp/chef-script20120409-8817-1y28ets-0: line 3: rbenv: command not found
/tmp/chef-script20120409-8817-1y28ets-0: line 5: rbenv: command not found
/tmp/chef-script20120409-8817-1y28ets-0: line 7: rbenv: command not found
---- End output of "bash" "/tmp/chef-script20120409-8817-1y28ets-0" ----
Ran "bash" "/tmp/chef-script20120409-8817-1y28ets-0" returned 127