C
Caspar Bl
Hi i'm trying to get the paypal library working in my rails app. I know
this is the ruby forum but i think this might be half a ruby question. I
installed the paypal gem.
$ gem list
*** LOCAL GEMS ***
##rails ones + others##
money (1.7.1)
Class aiding in the handling of Money.
paypal (2.0.0)
Paypal IPN integration library for rails and other web applications
#############
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'paypal'
=> false
irb(main):003:0> include Paypal
NameError: uninitialized constant Paypal
from (irb):3
irb(main):004:0> include paypal
NameError: undefined local variable or method `paypal' for
#<Object:0xb7cdd970>
from (irb):4
when i try and use the form helpers in rails
specifically the code below taken from the RDoc:
<%= paypal_form_tag %>
25: <%= paypal_setup "Item 500", Money.us_dollar(50000),
"(e-mail address removed)", :notify_url => url_foronly_path => false,
:action => 'paypal_ipn') %>
if get this error:
undefined local variable or method `paypal_form_tag' for
#<#<Class:0xb7692568>:0xb7692540>
Extracted source (around line #24):
21: </tr>
22: </table>
23:
24: <%= paypal_form_tag %>
I have added require 'paypal' to the end of my enviroment.rb .
I have this as my application_helper.rb
require 'paypal'
module ApplicationHelper
include Paypal::Helpers
end
I also now get this in my log
ApplicationController: missing default helper path application_helper
Please give me something else to try.
I am stumped!
regards
c
this is the ruby forum but i think this might be half a ruby question. I
installed the paypal gem.
$ gem list
*** LOCAL GEMS ***
##rails ones + others##
money (1.7.1)
Class aiding in the handling of Money.
paypal (2.0.0)
Paypal IPN integration library for rails and other web applications
#############
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'paypal'
=> false
irb(main):003:0> include Paypal
NameError: uninitialized constant Paypal
from (irb):3
irb(main):004:0> include paypal
NameError: undefined local variable or method `paypal' for
#<Object:0xb7cdd970>
from (irb):4
when i try and use the form helpers in rails
specifically the code below taken from the RDoc:
<%= paypal_form_tag %>
25: <%= paypal_setup "Item 500", Money.us_dollar(50000),
"(e-mail address removed)", :notify_url => url_foronly_path => false,
:action => 'paypal_ipn') %>
if get this error:
undefined local variable or method `paypal_form_tag' for
#<#<Class:0xb7692568>:0xb7692540>
Extracted source (around line #24):
21: </tr>
22: </table>
23:
24: <%= paypal_form_tag %>
I have added require 'paypal' to the end of my enviroment.rb .
I have this as my application_helper.rb
require 'paypal'
module ApplicationHelper
include Paypal::Helpers
end
I also now get this in my log
ApplicationController: missing default helper path application_helper
Please give me something else to try.
I am stumped!
regards
c