sous-chefs / rvm

Development repository for the rvm cookbook

Home Page:https://supermarket.chef.io/cookbooks/rvm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chef::Provider::Package::RVMRubygems::AlternateGemEnvironment

mlitwin-rpx opened this issue · comments

I am attempting to use this recipe in rightscale which uses chef 0.8.16.8. I am getting this error at convergence:

*ERROR> An error occurred during the execution of Chef. The error message was:

uninitialized constant Chef::Provider::Package::RVMRubygems::AlternateGemEnvironment

Looks like libraries/rvm_rubygems_package.rb is having issues, possibly with such an old version of chef?

It looks like Chef::Provider::Package::Rubygems did not contain an AlternateGemEnvironment class in version 0.8.x of Chef (this was introduced in the 0.9.x releases). So I guess in this current implementation, the 0.8.x versions of Chef wouldn't work with the rvm_gem LWRP.

To make this clear in the meantime, I'll add this gotcha to the README.

Any idea if RightScale has plans to upgrade their Chef gem version? I'd guess a lot of cookbook code would be breaking for their customers.

Looking into it more, I don't think I'd be able to support the 0.8 release line and 0.9+ line in a sustainable way. Certainly if anyone has ideas or pull requests I'm more than happy to engage. I'd rather not limit anyone's ability to use this project and I know you're most likely constrained in your Chef version but it looks like Opscode even considers this version really old:

Open Source Chef users should upgrade their chef-server(s) and chef-clients to the newest version that provides the functionality and bug fixes they require. Another driver for upgrades would be availability of support resources from Opscode and the community. Release Notes has a listing of all of the current supportable versions of Chef. Versions older than 0.9.0 should be considered obsolete at this point.

(Source: Opscode Wiki: Troubleshooting and Techical FAQ)

If I'm off the mark, please re-open!

They do have Chef 9 now so I just need to move to those images. Great to know this will should work in 9. Your recipe is quite nice.

On Nov 26, 2011, at 10:31 AM, "Fletcher Nichol" reply@reply.github.com wrote:

It looks like Chef::Provider::Package::Rubygems did not contain an AlternateGemEnvironment class in version 0.8.x of Chef (this was introduced in the 0.9.x releases). So I guess in this current implementation, the 0.8.x versions of Chef wouldn't work with the rvm_gem LWRP.

To make this clear in the meantime, I'll add this gotcha to the README.

Any idea if RightScale has plans to upgrade their Chef gem version? I'd guess a lot of cookbook code would be breaking for their customers.


Reply to this email directly or view it on GitHub:
#50 (comment)

Hmm.... it looks that with chef 9 there are similar problems with the attribute definition. Do I have to assign the attributes differently in chef .9 than as it is done in chef .10?

Here is what I do:

node['rvm']['global_gems'] = [
{ 'name' => 'daemon_controller',
'version' => '0.2.6'
},
{ 'name' => 'fastthread',
'version' => '1.0.7'
},
{ 'name' => 'passenger',
'version' => '3.0.9'
},
{ 'name' => 'rake',
'version' => '0.9.2'
},
{ 'name' => 'rack',
'version' => '1.3.4'
},
]

Here is what the chef converge output is in RS:

00:45:04: Setting the run_list to ["rs_utils::default", "rs_utils::setup_timezone", "rs_utils::setup_server_tags", "rs_utils::setup_hostname", "rs_utils::setup_mail", "rs_utils::setup_ssh", "rs_utils::setup_logging", "rs_utils::setup_monitoring", "rvm::rpx_app_rvm"] from JSON
00:45:04: Starting Chef Run (Version 0.9.14.3)
*ERROR> Chef converge failed
*ERROR> An error occurred during the execution of Chef. The error message was:

undefined method `[]=' for nil:NilClass

The error occurred line 4 of [COOKBOOKS]//cba6517ca09f7e2acb30dbb9524f3684485ab58e/cookbooks/rvm/attributes/rpx_app_rvm.rb in method 'from_file' while executing:

2 # attribute: rpx_app_rvm
3

  • node['rvm']['global_gems'] = [
    5 { 'name' => 'daemon_controller',
    6 'version' => '0.2.6'

*ERROR> Chef process failure
*ERROR> Chef process failed exited with 1

On Nov 26, 2011, at 11:01 AM, Fletcher Nichol wrote:

Looking into it more, I don't think I'd be able to support the 0.8 release line and 0.9+ line in a sustainable way. Certainly if anyone has ideas or pull requests I'm more than happy to engage. I'd rather not limit anyone's ability to use this project and I know you're most likely constrained in your Chef version but it looks like Opscode even considers this version really old:

Open Source Chef users should upgrade their chef-server(s) and chef-clients to the newest version that provides the functionality and bug fixes they require. Another driver for upgrades would be availability of support resources from Opscode and the community. Release Notes has a listing of all of the current supportable versions of Chef. Versions older than 0.9.0 should be considered obsolete at this point.

(Source: Opscode Wiki: Troubleshooting and Techical FAQ)

If I'm off the mark, please re-open!


Reply to this email directly or view it on GitHub:
#50 (comment)

I just realized that you also said .9 was out... misread your email.

Dang.

On Nov 26, 2011, at 11:01 AM, Fletcher Nichol wrote:

Looking into it more, I don't think I'd be able to support the 0.8 release line and 0.9+ line in a sustainable way. Certainly if anyone has ideas or pull requests I'm more than happy to engage. I'd rather not limit anyone's ability to use this project and I know you're most likely constrained in your Chef version but it looks like Opscode even considers this version really old:

Open Source Chef users should upgrade their chef-server(s) and chef-clients to the newest version that provides the functionality and bug fixes they require. Another driver for upgrades would be availability of support resources from Opscode and the community. Release Notes has a listing of all of the current supportable versions of Chef. Versions older than 0.9.0 should be considered obsolete at this point.

(Source: Opscode Wiki: Troubleshooting and Techical FAQ)

If I'm off the mark, please re-open!


Reply to this email directly or view it on GitHub:
#50 (comment)

commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.