【问题标题】:Security Update for Spree Finding Nil for Money:ClassSpree 的安全更新发现 Nil for Money:Class
【发布时间】:2014-03-31 20:17:58
【问题描述】:

这个security update for spree 刚刚发布,但是在运行了一些 Cucumber 测试后,我遇到了这个反复出现的问题:

undefined method `assume_from_symbol' for Money:Class (ActionView::Template::Error)

我在 GH 上搜索了项目 repo,我们没有使用该方法。搜索了Money repo,也没有发现。搜索 Spree 和 found this。该方法在我的开发环境中似乎未定义。

我不知道是 Spree 还是我正在处理的项目。有谁知道如何解决这个问题?

更新:当我运行 bundle exec zeus cucumber 时,我没有收到这些错误...

【问题讨论】:

    标签: ruby-on-rails spree


    【解决方案1】:

    刚遇到这个问题,按照以下建议:https://github.com/spree/spree/issues/4517

    IE:将其添加到您的 Gemfile 中

    gem 'money', '6.0.1'
    

    解决了我的问题。

    【讨论】:

      【解决方案2】:

      我认为这是 Spree 中的一个错误:

      https://github.com/spree/spree/issues/4517

      您应该在 Gemfile 中指定以下内容:

      gem 'money', '=6.0.1'
      

      暂时解决这个问题。

      【讨论】:

        【解决方案3】:

        约翰提供的答案对我有用。但是,我还必须使用 TextMate(或您自己的文本编辑器)编辑 Gemfile,以确保单引号正确,如本文所述:Gem syntax error questions

        【讨论】:

          猜你喜欢
          • 2022-06-20
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-04-22
          • 1970-01-01
          相关资源
          最近更新 更多