Forum: Ruby on Rails NameError/Unitialized Constant With PayPal Gem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
HH (Guest)
on 2006-01-31 21:18
(Received via mailing list)
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
joey__ (Guest)
on 2006-01-31 22:02
In config/environments.rb you need to add:
  require 'paypal'

Joey
HH (Guest)
on 2006-01-31 22:22
(Received via mailing list)
Yeah, just figured that out.

Duh.

Thanks.
This topic is locked and can not be replied to.