【问题标题】:gem attr_encrypted doesn't work with rails 2.3.8 + bundler?gem attr_encrypted 不适用于 rails 2.3.8 + bundler?
【发布时间】:2012-02-16 16:58:20
【问题描述】:

所以,当我将this gem 与 config.gem 方法一起使用时,它会跟踪 2 的 environment.rb 文件,一切都很好。我可以保存和读取加密的属性。

但是当我使用 bundler(首选方法 =D)时,attr_encrypted 突然无法读取或写入任何加密属性到数据库。控制台/日志/网页中的任何地方都没有错误。

有什么想法吗?

【问题讨论】:

    标签: ruby-on-rails ruby rubygems attr-encrypted


    【解决方案1】:

    解决办法是:

    gem "attr_encrypted", :require => nil
    

    在宝石文件中

    然后做

    require "attr_encrypted" 
    

    Bundler 之后的 environment.rb 中某处需要其他 gem。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-30
      相关资源
      最近更新 更多