RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.
http://railsapps.github.io/rails-stripe-membership-saas
1.14k stars 231 forks source link

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

Open benmicol opened 9 years ago

benmicol commented 9 years ago

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.

kathyonu commented 9 years ago

@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.

duwerq commented 9 years ago

@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.

benmicol commented 9 years ago

@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?