title: Drupal 7: drupal_add_js() is not adding .js file
body: <p>I want to add a .js file to my site and have it appear in the <code>&lt;head&gt;</code></p>
  
  <p>To do this I added the following to the theme's template.php file:</p>
  
  <pre><code>   function mytheme_preprocess_page(&amp;$variables) {
        drupal_add_js(drupal_get_path('theme', 'mytheme') . '/myfile.js', array(
          'type' =&gt; 'file',
          'group' =&gt; JS_THEME,
          'scope' =&gt; 'header',
        ));
     }
  </code></pre>
  
  <p>But nothing appears when I check the source code (note the .js file is in the theme root directory).</p>
  
  <p>I also tried </p>
  
  <pre><code>drupal_add_js('jQuery(document).ready(function () { console.log("Hello!"); });', 'inline');
  </code></pre>
  
  <p>But got nothing.</p>
  
  <p>Would anyone know why this is occuring and what I could do?</p>