# Server won't start with ActiveMerchant

**URL:** <https://www.ruby-forum.com/t/server-wont-start-with-activemerchant/159921>\
**Category:** Rails\
**Created:** [February 10, 2009, 1:19am UTC](https://www.ruby-forum.com/t/server-wont-start-with-activemerchant/159921 "2009-02-10T01:19:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fonziguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f05b48/32.png) [@fonziguy](https://www.ruby-forum.com/u/fonziguy)\
**Post date:** [February 10, 2009, 1:19am UTC](https://www.ruby-forum.com/t/server-wont-start-with-activemerchant/159921/1 "2009-02-10T01:19:06Z")

</div>

Hi,

Everything was working fine until I went to use ActiveMerchant.  
Have spent a few hours trying to figure this out with no success.

Here’s the error I’m getting

\*\* Starting Rails with development environment…  
Exiting  
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active\_support/dependencies.rb:445:in  
`load\_missing\_constant’: uninitialized constant ActiveMerchant  
(NameError)

And in environment.rb I have

unless RAILS\_ENV == ‘production’  
PAYPAL\_ACCOUNT = ‘removed\_email\_address@domain.invalid’  
ActiveMerchant::Billing::Base.mode = :test  
else  
PAYPAL\_ACCOUNT = ‘removed\_email\_address@domain.invalid’  
end

Appreciate anyone kind enough to help me out. Can’t get my head around  
this and holding me back.

Cheers

---

<div class="post-metadata">

**Author:** ![fonziguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f05b48/32.png) [@fonziguy](https://www.ruby-forum.com/u/fonziguy)\
**Post date:** [February 10, 2009, 4:28am UTC](https://www.ruby-forum.com/t/server-wont-start-with-activemerchant/159921/2 "2009-02-10T04:28:38Z")

</div>

Lee,

Do you need to have a require statement in environment.rb?

```
require 'active_merchant'

```

Al

On Feb 9, 4:19 pm, Lee M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
