title: valid publishable key set, yet get no valid publishable key set
body: <p>I am trying to make stripe checkout sample from stripe website works</p>
  
  <p><a href="https://stripe.com/docs/checkout/rails" rel="noreferrer">https://stripe.com/docs/checkout/rails</a></p>
  
  <p>, yet when I try to pay, I receive this <strong>error message</strong>.</p>
  
  <blockquote>
    <p>You did not set a valid publishable key. Call
    Stripe.setPublishableKey() with your publishable key. For more info,
    see <a href="https://stripe.com/docs/stripe.js" rel="noreferrer">https://stripe.com/docs/stripe.js</a></p>
  </blockquote>
  
  <p>In my <strong>JavaScript</strong> console the <strong>error message</strong> is </p>
  
  <blockquote>
    <p><a href="https://checkout.stripe.com/api/bootstrap?key=&amp;locale=en-US" rel="noreferrer">https://checkout.stripe.com/api/bootstrap?key=&amp;locale=en-US</a> Failed to
    load resource: the server responded with a status of 400 (Bad Request)</p>
  </blockquote>
  
  <p>In my <strong>console</strong> the <strong>error message</strong> is </p>
  
  <blockquote>
    <p>Started GET "/" for 10.240.1.15 at 2016-10-19 17:29:24 +0000 Cannot
    render console from 10.240.1.15! Allowed networks: 127.0.0.1, ::1,
    127.0.0.0/127.255.255.255 Processing by ChargesController#new as HTML   Rendered charges/new.html.erb within layouts/application (0.5ms)
    Completed 200 OK in 53ms (Views: 52.6ms | ActiveRecord: 0.0ms)</p>
  </blockquote>
  
  <p><strong>When I check my html source code stripe-key meta tag does not have any content?</strong></p>
  
  <p>The stripe sample uses their own secret and publishable keys, yet I use mine.</p>
  
  <p><strong>Please, if more info is needed, ask, so I can post.</strong></p>
  
  <p><strong>application.html.erb</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Workspace&lt;/title&gt;
    &lt;%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' =&gt; true %&gt;
    &lt;%= javascript_include_tag 'application', 'data-turbolinks-track' =&gt; true %&gt;
    &lt;%= javascript_include_tag  'https://js.stripe.com/v2/' %&gt; 
    &lt;%= csrf_meta_tags %&gt;
    &lt;%= tag :meta, :name=&gt; 'stripe-key', :content =&gt; ENV["STRIPE_PUBLIC_KEY"] %&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;%= yield %&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>charges.html.erb</strong></p>
  
  <p>
  </p>
  
  <pre><code>  &lt;head&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;%= yield %&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>stripe.js</strong></p>
  
  <pre><code>$(document).ready(function() {
      Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content'));        
  });
  </code></pre>
  
  <p><strong>stripe.rb</strong></p>
  
  <pre><code>Rails.configuration.stripe = {
    :publishable_key =&gt; ENV['PUBLISHABLE_KEY'],
    :secret_key      =&gt; ENV['SECRET_KEY']
  }
  
  Stripe.api_key = Rails.configuration.stripe[:secret_key]
  </code></pre>