Joined June 2014
·

Ryan

no
·
·

@superp I am also having trouble with this setup, I got past the same error you had by setting :rvm_string in the :gem_package attribute to match :default_ruby like this:

:rvm => {
  :default_ruby => "ruby-2.1.1",
    :vagrant => {
      :system_chef_solo => "/opt/vagrant_ruby/bin/chef-solo"
    },
    :gem_package => {
      :rvm_string => "ruby-2.1.1"
    }
}

My nginx::passenger recipe found the right ruby then. But I'm still working on it, now I'm getting a timeout on the gem rake install:

==> web: Compiled Resource:
==> web: ------------------
==> web: # Declared in /tmp/vagrant-chef-2/chef-solo-1/cookbooks/nginx/recipes/passenger.rb:31:in `from_file'
==> web: 
==> web: gem_package("rake") do
==> web:   provider Chef::Provider::Package::RVMRubygems
==> web:   action :install
==> web:   retries 0
==> web:   retry_delay 2
==> web:   guard_interpreter :default
==> web:   package_name "rake"
==> web:   version "10.3.2"
==> web:   cookbook_name :nginx
==> web:   recipe_name "passenger"
==> web:   gem_binary "gem"
==> web: end
==> web: 
==> web: 
==> web: 
==> web: 
==> web: [2014-06-11T19:39:45+00:00] INFO: Running queued delayed notifications before re-raising exception
==> web: [2014-06-11T19:39:45+00:00] INFO: template[nginx.conf] sending reload action to service[nginx] (delayed)
==> web: [2014-06-11T19:39:45+00:00] ERROR: Running exception handlers
==> web: [2014-06-11T19:39:45+00:00] ERROR: Exception handlers complete
==> web: [2014-06-11T19:39:45+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> web: [2014-06-11T19:39:45+00:00] ERROR: gem_package[rake] (nginx::passenger line 31) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 600s:
==> web: Command execeded allowed execution time, process terminated
==> web: ---- Begin output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem install rake -q --no-rdoc --no-ri -v \"10.3.2\"" ----
==> web: STDOUT: 
==> web: STDERR: Terminated
==> web: ---- End output of bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem install rake -q --no-rdoc --no-ri -v \"10.3.2\"" ----
==> web: Ran bash -c "source /etc/profile.d/rvm.sh && rvm ruby-2.1.1 do gem install rake -q --no-rdoc --no-ri -v \"10.3.2\"" returned 
==> web: [2014-06-11T19:39:45+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Achievements
1 Karma
0 Total ProTip Views