title: Evaluate javascript on Ruby
body: <p>I tried get code html of a web page, but the web contains some javascript code that generates some data that I need. </p>
  
  <pre><code>http = Net::HTTP.new('localhost')
  path = '/files.php'
  
  # POST request -&gt; logging in
  data = ''
  headers = {
     'Referer' =&gt;  'http://localhost:8080/files.php',
     'User-Agent' =&gt; 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0',
     'Accept' =&gt; 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
     'Accept-Language' =&gt; 'es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3',
     'Content-Encoding' =&gt; 'gzip, deflate',
     'Connection' =&gt; 'keep-alive',
     'Cookie' =&gt; ''
  }
  
  resp, data = http.post(path, data, headers)
  
  puts resp.body
  </code></pre>
  
  <p>But this only returns the html without evaluate the javascript. I would like get the final html after evaluate the javascript of the page.</p>