Tag: activemerchant activesupport

Active Merchant – 未初始化的常量ActiveSupport :: XmlMini_REXML :: StringIO

我有activemerchant 1.16.0和rails 3.0.5。 我正在尝试构建一个基本代码,以便使用活动商家与PayPal的网关进行通信。 if credit_card.valid? # or gateway.purchase to do both authorize and capture response = gateway.authorize(1000, credit_card, :ip => “127.0.0.1”) if response.success? gateway.capture(1000, response.authorization) puts “Purchase complete!” else puts “Error: #{response.message}” end else puts “Error: credit card is not valid. #{credit_card.errors.full_messages.join(‘. ‘)}” end 我收到以下错误: /Library/Ruby/Gems/1.8/gems/activesupport-3.0.9/lib/active_support/xml_mini/rexml.rb:20:in `parse’: uninitialized constant ActiveSupport::XmlMini_REXML::StringIO (NameError) 此错误从gateway.authorize()调用传播。 知道我的设置有什么问题吗? 谢谢。