我正在尝试运行ActiveMerchant gem版本1.4.1的单元测试:https://github.com/Shopify/active_merchant/tree/v1.4.1
首先,我运行了: rake -T,得到了错误:
uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAccess我通过添加以下内容修复了第一个错误:
gem 'activesupport', "=2.3.4"
require 'active_support'在Rakefile(https://github.com/Shopify/active_merchant/blob/v1.4.1/Rakefile的顶部)。请注意,我必须指定确切的版本(我猜在更高版本的ActiveSupport).中不存在HashWithIndifferentAccess
现在,如果我运行: rake test:units,我会得到同样的错误:
uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAccess下面是它尝试运行的任务(在相同的Rakefile中):
Rake::TestTask.new(:units) do |t|
t.pattern = 'test/unit/**/*_test.rb'
t.ruby_opts << '-rubygems'
t.verbose = true
end我怎样才能摆脱这个错误?我需要在任务中指定activesupport gem吗?
发布于 2011-03-11 05:30:41
gem 'activemerchant' # => Ruby 1.9.2 / AM 1.12.x
vs
gem 'active_merchant' # => ? / AM 1.5.2
发布于 2011-03-14 20:20:05
https://stackoverflow.com/questions/5245536
复制相似问题