Alexander Sinishin 16.Dec.2011 12:16pm
Thanks Pascal, I used console and found work around. I put in active_merchant_credit_card_processor.rb the line:

require ‘active_merchant’

Now it works!

===
Here FYI an error trace in console was:

[ruby@maricel Webiva]$ bundle exec script/console production
Loading production environment (Rails 2.3.5)
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
>> Shop::TestPaymentProcessor.transaction_partial
NameError: uninitialized constant Shop::ActiveMerchantCreditCardProcessor::ActiveMerchant
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing’
from /var/www/Webiva/vendor/modules/shop/app/models/shop/active_merchant_credit_card_processor.rb:2
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `polyglot_original_require’
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_or_load’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `rails_official_const_missing’
from /var/www/Webiva/lib/webiva_monkey_patches.rb:113:in `const_missing’
from /var/www/Webiva/vendor/modules/shop/app/models/shop/test_payment_processor.rb:1
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `polyglot_original_require’
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_or_load’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `rails_official_const_missing’
from /var/www/Webiva/lib/webiva_monkey_patches.rb:113:in `const_missing’
from (irb):1>> require ‘activemerchant’
MissingSourceFile: no such file to load — activemerchant
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `polyglot_original_require’
from /usr/lib/ruby/gems/1.8/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require’
from (irb):2

===
And a patched case is:

[ruby@maricel Webiva]$ bundle exec script/console production
Loading production environment (Rails 2.3.5)
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
>> require ‘active_merchant’
=> true
>> Shop::TestPaymentProcessor.transaction_partial
=> “/shop/config/credit_card_form”
>> exit

Must be logged in to reply.