title: PhantomJS fails with 'ReferenceError: Can't find variable: require'
body: <p>I am working in Ubuntu 14.04. I have done <code>npm install phantomjs</code> and now I am simply trying to screenshot a webpage, <a href="http://phantomjs.org/screen-capture.html" rel="nofollow">using the simple example in the docs</a>. </p>
  
  <p>This is my script:</p>
  
  <pre><code>var page = require('webpage').create();
  page.open('http://github.com/', function() {
    page.render('github.png');
    phantom.exit();
  });
  </code></pre>
  
  <p>Now I am trying to run it with <code>phantomjs --debug=true --ssl-protocol=any github.js</code>.</p>
  
  <p>However it fails with <code>ReferenceError: Can't find variable: require</code>.</p>
  
  <p>What am I doing wrong? </p>
  
  <p>I'm not sure if I need to allow outgoing/ingoing network connections.</p>
  
  <p>This is the error output in full: <a href="http://pastebin.com/raw/7p0nSeJx" rel="nofollow">http://pastebin.com/raw/7p0nSeJx</a></p>