开发者

uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAccess when running ActiveMerchant's unit tests

I am trying to run the unit tests of the ActiveMerchant gem version 1.4.1: https://github.com/Shopify/active_merchant/tree/v1.4.1

First I ran: rake -T and got the error:

uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAcces开发者_开发知识库s

I fixed that first error by adding:

gem 'activesupport', "=2.3.4"
require 'active_support'

at the top of the Rakefile(https://github.com/Shopify/active_merchant/blob/v1.4.1/Rakefile). Note that I had to specify the exact version (I guess HashWithIndifferentAccess doesn't exist in later versions of ActiveSupport).

Now, if I run: rake test:units, I get the same error:

uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAccess

Here is the task that it tries to run (in the same Rakefile):

  Rake::TestTask.new(:units) do |t|
    t.pattern = 'test/unit/**/*_test.rb'
    t.ruby_opts << '-rubygems'
    t.verbose = true
  end

How can I get rid of this error? Do I need to specify the activesupport gem inside the task?


gem 'activemerchant' # => Ruby 1.9.2 / AM 1.12.x

vs

gem 'active_merchant' # => ? / AM 1.5.2


ActiveMerchant is on version 1.12.0, so 1.4.1 is quite old - have you tried this with the latest version?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜