Stripe undefined `create 'method for # <Stripe :: ListObject:
I am trying to allow a user to add a credit card to my application using Stripe. When I call the code below (which is from the docs: https://stripe.com/docs/api#create_card ), I get the error below.
Are the documents obsolete or am I doing something wrong?
@card = Stripe::Customer.retrieve(current_account.stripe_id).cards.create(:card => params[:stripeToken])
undefined method `create' for #<Stripe::ListObject:... +4
2 answers
I solved this by replacing: gem "stripe" in my gemfile: gem 'stripe' ,: git => ' https://github.com/stripe/stripe-ruby ' and then the node is started. It worked fine, and then threw this error out of nowhere, but the update seems to fix it.
+2