Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

66%
+2 −0
Q&A How to circumvent Stripe::AuthenticationError: No API key provided

3 answers  ·  posted 3y ago by Trilarion‭  ·  last activity 3y ago by ArtOfCode‭

#2: Post edited by user avatar Trilarion‭ · 2021-12-30T11:24:03Z (almost 3 years ago)
  • I want to setup a local QPixel instance (WSL - Ubuntu 20.04) and am following the [guide](https://collab.codidact.org/posts/280451) by luap42.
  • Finally I get an error `Stripe::AuthenticationError: No API key provided. Set your API key using "Stripe.api_key = <API-KEY>".` in DonationsControllerTest.
  • ```Error:
  • DonationsControllerTest#test_should_create_PaymentIntent:
  • Stripe::AuthenticationError: No API key provided. Set your API key using "Stripe.api_key = <API-KEY>". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email [email protected] if you have any questions.
  • app/controllers/donations_controller.rb:33:in `intent'
  • test/controllers/donations_controller_test.rb:12:in `block in <class:DonationsControllerTest>'
  • bin/rails test test/controllers/donations_controller_test.rb:11
  • ```
  • This is probably related to the donation box and specific for Codidact, not really needed for QPixel. While it's nice that QPixel can have a donation possibility via Stripe, for my local development I would rather keep it optional, i.e. I would prefer if QPixel can be configured to work without donations.
  • Is there a quick fix to work around that error (without needing to get an API key from Stripe)?
  • I want to setup a local QPixel instance (WSL - Ubuntu 20.04) and am following the [guide](https://collab.codidact.org/posts/280451) by luap42.
  • Finally I get an error `Stripe::AuthenticationError: No API key provided. Set your API key using "Stripe.api_key = <API-KEY>".` in DonationsControllerTest.
  • ```Error:
  • DonationsControllerTest#test_should_create_PaymentIntent:
  • Stripe::AuthenticationError: No API key provided. Set your API key using "Stripe.api_key = <API-KEY>". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email [email protected] if you have any questions.
  • app/controllers/donations_controller.rb:33:in `intent'
  • test/controllers/donations_controller_test.rb:12:in `block in <class:DonationsControllerTest>'
  • bin/rails test test/controllers/donations_controller_test.rb:11
  • ```
  • This is probably related to the donation box and specific for Codidact, not really needed for QPixel. While it's nice that QPixel can have a donation possibility via Stripe, for my local development I would rather keep it optional, i.e. I would prefer if QPixel can be configured to work without donations.
  • Is there a quick fix to work around that error (without needing to get an API key from Stripe)?
  • I also filed a [feature request](https://github.com/codidact/qpixel/issues/747) to make donations optional. This here is more like the bug report and for quick fixes.
#1: Initial revision by user avatar Trilarion‭ · 2021-12-30T11:16:11Z (almost 3 years ago)
How to circumvent Stripe::AuthenticationError: No API key provided
I want to setup a local QPixel instance (WSL - Ubuntu 20.04) and am following the [guide](https://collab.codidact.org/posts/280451) by luap42.

Finally I get an error `Stripe::AuthenticationError: No API key provided. Set your API key using "Stripe.api_key = <API-KEY>".` in DonationsControllerTest.

```Error:
DonationsControllerTest#test_should_create_PaymentIntent:
Stripe::AuthenticationError: No API key provided. Set your API key using "Stripe.api_key = <API-KEY>". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email [email protected] if you have any questions.
    app/controllers/donations_controller.rb:33:in `intent'
    test/controllers/donations_controller_test.rb:12:in `block in <class:DonationsControllerTest>'


bin/rails test test/controllers/donations_controller_test.rb:11
```

This is probably related to the donation box and specific for Codidact, not really needed for QPixel. While it's nice that QPixel can have a donation possibility via Stripe, for my local development I would rather keep it optional, i.e. I would prefer if QPixel can be configured to work without donations.

Is there a quick fix to work around that error (without needing to get an API key from Stripe)?