Skip to content

Instantly share code, notes, and snippets.

@dewski
Created October 24, 2009 05:18
Show Gist options
  • Select an option

  • Save dewski/217377 to your computer and use it in GitHub Desktop.

Select an option

Save dewski/217377 to your computer and use it in GitHub Desktop.
>> require 'rubygems'
=> false
>> require 'active_merchant'
NameError: uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAccess
from /Library/Ruby/Gems/1.8/gems/activemerchant-1.4.2/lib/active_merchant/lib/validateable.rb:31
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/activemerchant-1.4.2/lib/active_merchant.rb:51
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):37
>>
?> # Use the gateway's test server
?> ActiveMerchant::Billing::Base.mode = :test
NameError: uninitialized constant ActiveMerchant::Billing
from (irb):40
>>
?> # Next, construct a CreditCard object that will be charged during the
?> # transaction
?> credit_card = ActiveMerchant::Billing::CreditCard.new({
?> :first_name => 'Garrett',
?> :last_name => 'Bjerkhoel',
?> :number => '4111111111111111',
?> :month => '10',
?> :year => '2010',
?> :verification_value => '999'
>> })
NameError: uninitialized constant ActiveMerchant::Billing
from (irb):44
>>
?> if credit_card.valid?
>> gateway = ActiveMerchant::Billing::BraintreeGateway.new({
?> :login => 'testapi',
?> :password => 'password1'
>> })
>>
?> response = gateway.purchase(100, credit_card)
>>
?> print "(TEST) " if response.test?
>>
?> if response.success?
>> puts "The transaction was successful! The authorization is #{response.authorization}"
>> else
?> puts "The transaction was unsuccessful because #{response.message}"
>> end
>> else
?> puts "The credit card is invalid"
>> end
NoMethodError: undefined method `valid?' for nil:NilClass
from (irb):53
>> require 'rubygems'
=> false
>> require 'active_merchant'
NameError: uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAccess
from /Library/Ruby/Gems/1.8/gems/activemerchant-1.4.2/lib/active_merchant/lib/validateable.rb:31
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/activemerchant-1.4.2/lib/active_merchant.rb:51
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):72
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment