title: undefined method `stripe' for # <Rails
body: <p>I am trying to do my first test order through Stripe on my Rails app that I'm testing out but I'm getting a NoMethodError - undefined method `stripe' for #, exact line that's causing it is in a JS snippet on my form order file.</p>
  
  <p>Edit: Adding screenshot of the error, changing Rails.configuration.stripe to Rails.application.secrets lets the page load but the checkout is throwing another error (screenshot also attached)</p>
  
  <p><a href="http://i.stack.imgur.com/MZsxY.png" rel="nofollow">error screenshot</a>
  <a href="http://i.stack.imgur.com/lL4ec.png" rel="nofollow">publishable error</a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt; script &gt;
    var handler = StripeCheckout.configure({
      key: '&lt;%= Rails.configuration.stripe[:publishable_key] %&gt;',
      token: function(token, arg) {
        document.getElementById("stripeToken").value = token.id;
        document.getElementById("stripeEmail").value = token.email;
        document.getElementById("chargeForm").submit();
      }
    });
  
  document.getElementById('btn-order').addEventListener('click', function(e) {
    var quantity = $('#quantity').val();
    var total_price = (quantity * "&lt;%= @meal.price %&gt;") + "00";
    $('#total_price').val(total_price);
    handler.open({
      name: "Sixerr",
      description: "&lt;%= @meal.title %&gt;",
      amount: total_price
    });
    e.preventDefault();
  }); &lt; /script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And here is my stripe.rb file</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Rails.configuration.stripe = {
    :publishable_key =&gt; ENV['STRIPE_PUBLISHABLE_KEY'],
    :secret_key      =&gt; ENV['STRIPE_SECRET_KEY']
  }
  
  Stripe.api_key = Rails.configuration.stripe[:secret_key]</code></pre>
  </div>
  </div>
  </p>
  
  <p>There was a couple other answers but none of them seemed to fix the problem, appreciate any help here.</p>