# NameError/Unitialized Constant With PayPal Gem

**URL:** <https://www.ruby-forum.com/t/nameerror-unitialized-constant-with-paypal-gem/99552>\
**Category:** Rails\
**Created:** [January 31, 2006, 8:18pm UTC](https://www.ruby-forum.com/t/nameerror-unitialized-constant-with-paypal-gem/99552 "2006-01-31T20:18:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [January 31, 2006, 8:18pm UTC](https://www.ruby-forum.com/t/nameerror-unitialized-constant-with-paypal-gem/99552/1 "2006-01-31T20:18:45Z")

</div>

I am trying to use the PayPal gem and having a little trouble.

I installed the gem w/o any trouble:

paypal (1.0.1)  
Paypal IPN integration library for rails and other web applications

When I try to use it in my controller, as follows:

def paypal\_ipn  
notify = Paypal::Notification.new(request.raw\_post)  
…  
end

I get a NameError:

uninitialized constant Paypal  
This error occured while loading the following files:  
paypal.rb

Like it can’t find the gem files… I looked and the gem is in place and  
the  
files are all intact.

Am I doing something wrong? Did I mistype something that I’m missing?

I’ve been going over this but if there is an error in the code, I am  
blind  
to it.

Any help is appreciated.

H

---

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [January 31, 2006, 9:02pm UTC](https://www.ruby-forum.com/t/nameerror-unitialized-constant-with-paypal-gem/99552/2 "2006-01-31T21:02:33Z")

</div>

In config/environments.rb you need to add:  
require ‘paypal’

Joey

---

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [January 31, 2006, 9:22pm UTC](https://www.ruby-forum.com/t/nameerror-unitialized-constant-with-paypal-gem/99552/3 "2006-01-31T21:22:56Z")

</div>

Yeah, just figured that out.

Duh.

Thanks.
