title: How to send an acceptable response when trying to receive SMS with Twilio, Heroku, and Rails?
body: <p>So I had (most) of the following setup working on a Twilio test number last week.  I was running from localhost:300 using ngrok to receive the POST from twilio.  Everything worked great: didn't need blank-response.xml.erb, just rendered <code>:nothing =&gt; true</code> and the message came in and was handled by the controller - simple.</p>
  
  <p>Today I am trying to deploy the app on heroku (and am switching credentials to a paid account) and keep recieving the following error in the Twilio console:</p>
  
  <pre><code>12200 Schema validation warning
  Cvc-elt.1: Cannot find the declaration of element 'html'.
  </code></pre>
  
  <p>I have tried rendering the xml response a half dozen different ways with the most textbook version outlined below.  My problem is the response <strong>never</strong> changes (from what's also listed below).  I don't know if I'm missing something stupid or if Heroku hates Twilio or what and I'm at a loss as to what to do at this point.  Any help is welcome!</p>
  
  <h1>Code samples</h1>
  
  <p>url (Twilio webhook): </p>
  
  <pre><code>http://www.mycoolurl.com/confirmation
  </code></pre>
  
  <p>routes.rb:</p>
  
  <pre><code>post 'confirmation' =&gt; 'appointments#confirm'
  </code></pre>
  
  <p>appointments_controller:</p>
  
  <pre><code>def confirm
      incoming_message_body = params["Body"]
      from_number = params["From"]
  
      if incoming_message_body.downcase.match("yes")
          puts "CONFIRMED for #{from_number}"
      elsif incoming_message_body.downcase.match("no")
          puts "CANCELED for #{from_number}"
      end     
  
      render 'blank-response.xml.erb', :content_type =&gt; 'text/xml'
  end
  </code></pre>
  
  <p>blank-response.xml.erb</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Response&gt;&lt;/Response&gt;
  </code></pre>
  
  <p>Response from my Rails App:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;My Cool Website&lt;/title&gt;
      &lt;META name="description" content="some stupid blurb about this site"&gt;
      &lt;META name="keywords" content="a bunch of cool keywords"&gt;
          &lt;/head&gt;
          &lt;frameset rows="100%,*" border="0"&gt;
          &lt;frame src="https://cool-name-24253.herokuapp.com/confirmation" frameborder="0" /&gt;
              &lt;frame frameborder="0" noresize /&gt;
          &lt;/frameset&gt;
          &lt;!-- pageok --&gt;
          &lt;!-- 06 --&gt;
          &lt;!-- --&gt;
      &lt;/html&gt;
  </code></pre>