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

uninitialized constant CryptKeeper::Provider::AesNew #133

Closed
bliaxiong opened this issue Feb 23, 2017 · 4 comments
Closed

uninitialized constant CryptKeeper::Provider::AesNew #133

bliaxiong opened this issue Feb 23, 2017 · 4 comments

Comments

@bliaxiong
Copy link

I'm trying to test this gem out with a simple app and getting uninitialized constant CryptKeeper::Provider::AesNew. Using Ruby 2.3.1 and Rails 5.0.0. I scaffold a blog and have the following:

class Blog < ApplicationRecord
	crypt_keeper :title, :body, :encryptor => :aes_new, :key => 'super_good_password', salt: 'salt', :encoding => 'UTF-8'
end

Not sure why its throwing that error when I try to create a Blog. Thanks in advance!

@jmazzi jmazzi closed this as completed Oct 25, 2017
@safetymonkey
Copy link

Did this get closed because any action was taken? I'm getting the same error:

An error occurred while loading ./spec/models/direct_ftp_delivery_spec.rb.
Failure/Error:
  crypt_keeper :password, encryptor: :aes_new, key: 'I think super long ' \
    'passwords tend to be the best ones, don\'t you?', salt: 'sodium chloride'

NameError:
  uninitialized constant CryptKeeper::Provider::AesNew
# ./app/models/direct_ftp_delivery.rb:5:in `<class:DirectFtpDelivery>'
# ./app/models/direct_ftp_delivery.rb:2:in `<top (required)>'
# ./spec/models/direct_ftp_delivery_spec.rb:3:in `<top (required)>'

An error occurred while loading ./spec/models/direct_sftp_delivery_spec.rb.
Failure/Error:
  crypt_keeper :password, encryptor: :aes_new, key: 'I think super long ' \
    'passwords tend to be the best ones, don\'t you?', salt: 'sodium chloride'

NameError:
  uninitialized constant CryptKeeper::Provider::AesNew
# ./app/models/direct_sftp_delivery.rb:5:in `<class:DirectSftpDelivery>'
# ./app/models/direct_sftp_delivery.rb:2:in `<top (required)>'
# ./spec/models/direct_sftp_delivery_spec.rb:3:in `<top (required)>'
Run options: exclude {"mysql_db"=>true, "postgres_db"=>false, "oracle_db"=>true, "ldap"=>true}

@jmazzi
Copy link
Owner

jmazzi commented Mar 23, 2018

@safetymonkey have you tried the same code in a newly generated rails app? Does the error happen then?

@itspriddle
Copy link
Collaborator

Just wanted to point out that the AesNew encryptor was removed in 2.0.0.rc1 (see #140) – so if you are using the release candidate this is expected behavior.

@safetymonkey
Copy link

Yeah, I changed the encryptor over to active_support (thanks for that, by the way!) and all my tests started passing. Based on the comment from @itspriddle it sounds like I don't need to go replicate. Thanks for the assistance!

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

No branches or pull requests

4 participants