Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>it seems you must first require a library such as "open-uri" like in the following example:</p> <pre><code>david@archbox:~$ irb irb(main):001:0&gt; require 'open-uri' =&gt; true irb(main):002:0&gt; open("http://dx.doi.org/10.1038/nrd842","Accept" =&gt;"text/bibliography; style=bibtex"){|f| f.each {|line| print line}} @article{Atkins_Gershell_2002, title={From the analysts couch: Selective anticancer drugs}, volume={1}, url={http://dx.doi.org/10.1038/nrd842}, DOI={10.1038/nrd842}, number={7}, journal={Nature Reviews Drug Discovery}, publisher={Nature Publishing Group}, author={Atkins, Joshua H. and Gershell, Leland J.}, year={2002}, month={Jul}, pages={491-492}}=&gt; #&lt;StringIO:0x95cf914 @base_uri=#&lt;URI::HTTP:0x95cfcd4 URL:http://data.crossref.org/10.1038%2Fnrd842&gt;, @meta={"date"=&gt;"Mon, 29 Jul 2013 22:54:09 GMT", "server"=&gt;"Apache/2.2.3 (CentOS)", "x-powered-by"=&gt;"Phusion Passenger (mod_rails/mod_rack) 3.0.7", "vary"=&gt;"Accept", "access-control-allow-origin"=&gt;"*", "x-content-type-options"=&gt;"nosniff", "content-length"=&gt;"351", "status"=&gt;"200", "connection"=&gt;"close", "content-type"=&gt;"text/bibliography;charset=utf-8"}, @status=["200", "OK"]&gt; </code></pre> <p>Create a file to hold your code, perhaps rtest.rb, inside this file paste the following code:</p> <pre><code>require 'open-uri' open("http://dx.doi.org/10.1038/nrd842","Accept" =&gt;"text/bibliography; style=bibtex"){|f| f.each {|line| print line}} </code></pre> <p>Save the file, then run with:</p> <pre><code>ruby rtest.rb </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload