We've moved discussions to Discord

Why is current_account returning nil?

benjamin shrimpton
I'm trying to setup a paywall in front of videos.  I've just followed the video tutorials on setting up everything, but Chris uses current_team.  I went thru the commit history and see that it's since been switched to current_account.  But current_account is returning nil for some reason.

I'm getting undefined method `subscriptions' for #<Stripe::Customer:0x00007f8f362ed390> when I try to subscribe (via the Stripe gateway), which is coming from app/controllers/subscriptions_controller.rb:22:in `create'

I'm entirely at a loss as to what I've done wrong.  Any assistance would be greatly appreciated.
Martin McDermid
I'm having the same issue, current_account returning nil. Will only return if I create another account and then switch.
Chris Oliver
Already emailed this to Ben over email, but reposting here:

What version of the Stripe API are you using?

current_account will always return nil in the Rails console because the account is set up session, subdomain, and domain. None of which you have in the Rails console.

Martin McDermid , sounds like a separate issue for you. You'll have to share some more details like what account config options you have enabled and disabled in the Jumpstart config and what request you're making.
benjamin shrimpton
I've just run brew install stripe/stripe-cli/stripe as per the Readme.

I did brew list stripe --version and it returns stripe 1.5.1.
benjamin shrimpton I had the same issue and just upgraded  Chris Oliver 's `pay` gem to 2.2.0 and it resolved it for me
Notifications
You’re not receiving notifications from this thread.