rails-stripe-membership-saas icon indicating copy to clipboard operation
rails-stripe-membership-saas copied to clipboard

HAML breaks sign up. "Couldn't Find Plan"

Open benmicol opened this issue 10 years ago • 3 comments

After trying to test the sign-up and receiving "couldn't find plan" each time, I looked at the signup params and saw that "plan_id" was expected, but was not included in the devise new registration form/view. In the Views>Devise>Registrations folder there were 2 versions of "new.html....." one ".erb" and the other ".haml". Deleting the .erb version fixed it for me but I suspect there may be other duplicates that could cause issue. I started from scratch twice to make sure it wasn't a configuration error, but I may be missing something.

benmicol avatar Sep 10 '15 20:09 benmicol

@benmicol Very nice catch, thank you for finding it. I have been working on stripe-ruby-mock-stripe-1.24.0 branch upgrade and am neck deep in making sure Plan is a mirror of stripe, for testing. Once I have that in place, I will be putting new tests in place on the rails-stripe-membership-app. What is funny is .. every failing test I have right now (in the stripe-ruby-mock gem itself ) is : No such plan: {} even though the plan has been created and is in place. Too funny.

kathyonu avatar Sep 10 '15 20:09 kathyonu

@benmicol did you end up figuring this out? I've been driving myself nuts trying to find the issue. I don't seem to have the HAML file in my registration folder but it's still giving me the same "Couldn't Find Plan" issue.

duwerq avatar Sep 24 '15 17:09 duwerq

@twolips Are you indeed using HAML as specified in Rails Composer? If so you should see the HAML view in your Registrations folder. If you are instead using the default ERB views, have you double checked that your Stripe API keys are being registered properly?

benmicol avatar Sep 24 '15 18:09 benmicol