我正在尝试使用 paypal_adaptive gem 开发一个小应用程序,但每次我尝试这样做时:
ipn = PaypalAdaptive::IpnNotification.new
它适用于开发,但使用 mysql 在生产中失败,并且出现此错误:
NoMethodError:未定义的方法to_sym' for nil:NilClass
from /usr/local/rvm/gems/ruby-1.9.3-p327/gems/paypal_adaptive-0.3.2/lib/paypal_adaptive/config.rb:28:in
初始化'来自/usr/local/rvm/gems/ruby-1.9.3-p327/gems/paypal_adaptive-0.3.2/lib/paypal_adaptive/config.rb:69:in new'
from /usr/local/rvm/gems/ruby-1.9.3-p327/gems/paypal_adaptive-0.3.2/lib/paypal_adaptive/config.rb:69:in
config'来自/usr/local /rvm/gems/ruby-1.9.3-p327/gems/paypal_adaptive-0.3.2/lib/paypal_adaptive/ipn_notification.rb:9:in initialize'
from (irb):1:in
new' from (irb):1 from /usr/local/rvm/gems/ ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in start'
from /usr/local/rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in
start' from /usr/local/rvm/gems/ruby-1.9.3-p327/gems /railties-3.2.8/lib/rails/commands.rb:41:in <top (required)>'
from script/rails:6:in
require' from script/rails:6:in `'