You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is summarized by @yfeldblum in a comment for #14. The change was added to close #10 but clearly is not totally correct yet.
A copy of the comment text is included:
Additionally, once I do the above and have RVM installed and RVM rubies installed but no default RVM ruby (instead continuing to use system ruby as the default)....
When I follow up and do
rvm_gem "whatever" do
ruby_string "ruby-1.9.2-p180" # that's one of the already-installed RVM rubies
end
then, in the same initial run of the my cookbook (which makes use of your RVM cookbook), I get
ERROR: rvm_gem[whatever] (/srv/chef/cache/cookbooks/myfuncookbook/recipes/myfunrecipe.rb:1:in `from_file') had an error:
Expected process to exit 0, but it exited with 127
---- Begin output of bash -c "source /etc/profile.d/rvm.sh" && rvm ruby-1.9.2-p180 gem env gempath ----
STDOUT:
STDERR: sh: rvm: not found
---- End output of bash -c "source /etc/profile.d/rvm.sh" && rvm ruby-1.9.2-p180 gem env gempath ----
Ran bash -c "source /etc/profile.d/rvm.sh" && rvm ruby-1.9.2-p180 gem env gempath returned 127
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/shell_out.rb:232:in `invalid!'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/shell_out.rb:218:in `error!'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/mixin/shell_out.rb:33:in `shell_out!'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider/package/rubygems.rb:237:in `gem_paths'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider/package/rubygems.rb:245:in `gem_source_index'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider/package/rubygems.rb:76:in `installed_versions'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider/package/rubygems.rb:346:in `matching_installed_versions'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider/package/rubygems.rb:329:in `current_version'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider/package/rubygems.rb:362:in `load_current_resource'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource.rb:394:in `run_action'
/srv/chef/cache/cookbooks/rvm/providers/gem.rb:109:in `gem_package_wrapper'
/srv/chef/cache/cookbooks/rvm/providers/gem.rb:40:in `class_from_file'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider.rb:104:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/provider.rb:104:in `action_install'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource.rb:395:in `send'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource.rb:395:in `run_action'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/runner.rb:53:in `run_action'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/runner.rb:89:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/runner.rb:89:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/runner.rb:89:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource_collection.rb:94
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/runner.rb:84:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/client.rb:268:in `converge'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/client.rb:171:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/application/client.rb:222:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/application/client.rb:212:in `loop'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/application/client.rb:212:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/../lib/chef/application.rb:62:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.9.16/bin/chef-client:26
/usr/bin/chef-client:19:in `load'
/usr/bin/chef-client:19
But on the second attempt to run the cookbook, the "rvm_gem[whatever]" resource succeeds (instead of failing with the above backtrace) as expected.
The text was updated successfully, but these errors were encountered:
I'm suspecting there is a regression or breaking change in the RVM codebase post v1.6.5 that is contributing here. When I lock the RVM version to the 1.6.5 release (most current at this date):
{ "rvm": { "version": "1.6.5" } }
the error is not tripped. Will have to follow up in #rvm (freenode) or keep digging elsewhere.
Anyone still have issues with this one? RVM 1.6.20 seems much better behaved and the rvm_gem provider has been totally rewritten since this bug was filed. I'll be aggressive and close it but by all means re-open if I'm incorrect.
This is summarized by @yfeldblum in a comment for #14. The change was added to close #10 but clearly is not totally correct yet.
A copy of the comment text is included:
Additionally, once I do the above and have RVM installed and RVM rubies installed but no default RVM ruby (instead continuing to use system ruby as the default)....
When I follow up and do
then, in the same initial run of the my cookbook (which makes use of your RVM cookbook), I get
But on the second attempt to run the cookbook, the "rvm_gem[whatever]" resource succeeds (instead of failing with the above backtrace) as expected.
The text was updated successfully, but these errors were encountered: