-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stripe::AuthenticationError #152
Comments
That's odd. Thanks for providing the diagnostic detail. It looks like it should be fine. Try hardcoding the keys into the config/secrets.yml file (temporarily, don't check in to Git). I've just attempted generating the app Using Rails Composer and running |
@DanielKehoe you were right, hardcoding Stripe keys into the config/secrets.yml make it working, then I guess is something "local env" related, may be something to do with my ssl localhost configuration and the fact that I go with https://localhost:3000/ ? ... need more investigation. |
I also had to hardcode keys in to secrets.yml. It looks like ENV isn't working for a lot of people. |
@lgs @archonic @DanielKehoe @tmock12 The single finest answer to these questions rests here Rails Environmental Variables authored by Taylor Mock and Daniel Kehoe, last updated 20121215. Also, I will share what I have done so far to make environmental variables easy peasy. My opinion is after working all methods described in the articles is : the config/local_env.yml is the tool of choice especially if you are dealing with lots of apps, lots of repositories. It takes a minute maybe two to set up the local_env.yml file, making certain you .gitignore it because this local_env.yml file holds the crown jewels of all passwords, secret keys, etc., and make the addition of a code block in your config/application.rb file, and bham! problem solved forever on that app. And, these tests on the two tests making sure the Stripe keys are in place will pass every time. Next app, set it up the way you need and want with its own local_env.yml file in each app complete unto itself. Please note, the reference article gives a thumbs up to Figaro gem. I abandoned that gem quite a while ago, due to exact changes I cannot recall where Figaro was unuseful in terms of setting env variables on Heroku. I set the Heroku variables directly with $ heroku config add commands, one time, it is done, so no need for Figaro. I would be happy indeed to write these codes into the rails-stripe-membership-saas app, so that everyone can enjoy trouble free environment variables in development and test. |
@lgs @archonic @DanielKehoe @tmock12 The two tests I mentioned are located here : https://github.com/kathyonu/rails-stripe-membership-saas/blob/testsformaster/spec/stripe/stripe_config_spec.rb Please do note this is the testsformaster branch of my fork of the app. This branch contains a boatload of /spec tests you may find useful. They are all part of the open pull request on this branch. More tests are coming because my personal goal is 100% tests coverage of our production app, and i have found it is pretty easy to adapt those tests to the rails-stripe-membership-saas app and contribute them to RailsApps. |
@kathyonu very useful, many thanks! |
@lgs many welcomes |
…; hardcoded stripe API keys into secrets.yml to work with my development environment, see: RailsApps/rails-stripe-membership-saas#152
After building with
I get the following error:
even if Linux env and rails config/secrets.yml seem fine:
The text was updated successfully, but these errors were encountered: