title: Cast integer to string - rails - mysql
body: <p>I'm trying to cast an integer as a string in a rails query.  For example, I want to replicate this SQL</p>
  
  <pre><code>SELECT CAST(id AS CHAR) FROM `articles` WHERE `articles`.`name` = 'Frustrated';
  </code></pre>
  
  <p>This selects the id</p>
  
  <pre><code>Article.where( name: "Frustrated" ).select("id")
  </code></pre>
  
  <p>But this dies</p>
  
  <pre><code> Article.where( name: "Frustrated" ).select("CAST (id AS CHAR) ")
  </code></pre>
  
  <p>even though the SQL looks identical.</p>
  
  <p>Is it possible to do this, what am I doing wrong?</p>