Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ohai less than 8 for 1.9.3 #2

Closed
wants to merge 1 commit into from
Closed

Conversation

chhsiung
Copy link

@chhsiung chhsiung commented Apr 2, 2015

for whatever reasons, when i use the encrypted-attributes cookbook, it's bombing on chef_gem chef-encrypted-attributes... here's output when i attempt to manually install (i think/hope this is equivalent to chef gem install; please tell me if i'm wrong)

opower-qa-jenkins@qa-jenkins-slave-1020:~$ sudo /opt/chef/embedded/bin/gem install chef-encrypted-attributes
Fetching: ffi-yajl-1.4.0.gem (100%)
Building native extensions.  This could take a while...
Fetching: chef-encrypted-attributes-0.4.0.gem (100%)
Fetching: mime-types-2.4.3.gem (100%)
Fetching: systemu-2.6.5.gem (100%)
Fetching: mixlib-shellout-2.0.1.gem (100%)
Fetching: wmi-lite-1.0.0.gem (100%)
Fetching: ohai-8.2.0.gem (100%)
ERROR:  Error installing chef-encrypted-attributes:
    ohai requires Ruby version >= 2.0.0.

i think it's because im stuck using older chef (11.12) and ruby (1.9.3) so the version of ohai available is 7.0.2 and i can't install 8.

let me know if there's a better way around this.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9582ad2 on chhsiung:ohai-for-193 into 9f6eea4 on onddo:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9582ad2 on chhsiung:ohai-for-193 into 9f6eea4 on onddo:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 9582ad2 on chhsiung:ohai-for-193 into 9f6eea4 on onddo:master.

@@ -20,6 +20,6 @@
class Chef
class EncryptedAttribute
# `chef-encrypted-attributes` gem version.
VERSION = '0.5.0.dev'
VERSION = '0.5.1'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, don't change the gem version in this PR.

@zuazo
Copy link
Owner

zuazo commented Apr 2, 2015

I will try to investigate this. But keep in mind that Ruby 1.9.3 is no longer supported. So if the solution turns out to be tricky, may be we should drop 1.9.3 support. It seems that as time goes on we will have to add more and more exceptions 😞

Do you find it difficult to update your Ruby versions?

@zuazo zuazo added the bug label Apr 2, 2015
@zuazo zuazo self-assigned this Apr 2, 2015
@zuazo
Copy link
Owner

zuazo commented Apr 2, 2015

I fixed this in master. But keep in mind that this kind of fixes are temporal.

@zuazo zuazo closed this Apr 2, 2015
@chhsiung
Copy link
Author

chhsiung commented Apr 2, 2015

thanks for the quick turnaround @zuazo! yeah, we know 1.9.3 isnt supported anymore and are looking into upgrading, but i'm not sure what the timeframe will be for us to move off 1.9.3 :( based on how quickly we moved off 1.9.2, i'm not optimistic.

any idea when a version of this will get cut?

@zuazo
Copy link
Owner

zuazo commented Apr 2, 2015

I'm planing to release this tomorrow if everything works as expected. I want to test it a bit just in case.

Thanks for the report anyway 😉

@zuazo
Copy link
Owner

zuazo commented Apr 3, 2015

Fix released in 0.5.0.

@chhsiung
Copy link
Author

hi @zuazo, i just got back from vacation so finally am back to getting this to work for me! i'm seeing some odd behavior however. i'm unable to install the 0.5.0 gem available on rubygems.org, still running into the same error documented above (dependency of ohai > 8 requiring ruby 2.0 or higher).

however, when i build the tagged 0.5.0 version of this gem locally and upload it to our internal gemserver and attempt to install the gem from our server... it installs fine.

any chance something is messed up with the 0.5.0 gem version that was pushed to rubygems? pulling the 0.5.0 version from github and building seems to work just fine for me.

@zuazo zuazo reopened this Apr 24, 2015
@zuazo zuazo closed this in ce4644d Apr 28, 2015
@zuazo
Copy link
Owner

zuazo commented Apr 28, 2015

OK, that problem was because the gemspec is not evaluated in the installation process. I tried to fix this using a hack. But I have not been able to verify that it works 😖 Maybe I should release a beta.

@chhsiung
Copy link
Author

@zuazo thanks for the fix. i'm not sure how to help test it out for you though as when i build the gem locally, it installs fine for me =/ let me know if you do decide to beta it, i can try to install it then.

@zuazo
Copy link
Owner

zuazo commented May 1, 2015

Sorry for the delay. I released this in 0.6.0.beta.1:

node.default['encrypted_attributes']['version'] = '0.6.0.beta.1'
include_recipe 'encrypted_attributes'

@chhsiung
Copy link
Author

chhsiung commented May 1, 2015

hrm... locally i'm running into an issue:

$ gem install chef-encrypted-attributes -v 0.6.0.beta.1
Building native extensions.  This could take a while...
ERROR:  Error installing chef-encrypted-attributes:
    ERROR: Failed to build gem native extension.

    /Users/crystal/.rbenv/versions/1.9.3-p392/bin/ruby mkrf_conf.rb
mkrf_conf.rb: undefined local variable or method `s' for main:Object

rake failed, exit code 1

@zuazo
Copy link
Owner

zuazo commented May 2, 2015

@chhsiung, thanks for testing the beta. I released 0.6.0.beta.2 with the fix for that error.

@zuazo
Copy link
Owner

zuazo commented May 8, 2015

The second fix released in 0.6.0.

@zuazo
Copy link
Owner

zuazo commented May 20, 2015

I released gem version 0.7.0 that removes the hack used to fix this issue. But I also remove the dependencies causing the issue. So the error should not occur again. Let me know if it fails again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants