#!/usr/bin/env ruby # Test to simulate the exact check that's happening in the EventsController puts "Testing the exact Stripe configuration check from EventsController..." # Simulate the exact check stripe_configured = Rails.application.config.stripe[:secret_key].present? puts "Direct check result: #{stripe_configured}" # Check the actual value puts "Secret key value: #{Rails.application.config.stripe[:secret_key]}" # Check if it's nil or empty puts "Secret key is nil?: #{Rails.application.config.stripe[:secret_key].nil?}" puts "Secret key is empty?: #{Rails.application.config.stripe[:secret_key].empty?}" # Check the type puts "Secret key class: #{Rails.application.config.stripe[:secret_key].class}"