tag:help.rubygems.org,2010-01-19:/discussions/problems/470-confused-query-descriptionsRubyGems.org: Discussion 2015-08-17T20:21:19Ztag:help.rubygems.org,2010-01-19:Comment/49607882011-01-29T19:26:27Z2011-01-29T19:26:27Zconfused query descriptions<div><p>Not sure what's up with this. Any ideas, Eric? Also, if you run
<code>gem sources -c</code> and try these commands again does it
work?</p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/49607882011-01-30T01:55:39Z2011-01-30T01:55:43Zconfused query descriptions<div><p>Hmm, I guess it were just invalid caches: <code>gem sources
-c</code> fixed it.<br></p>
<pre>
$ gem sources -c
*** Removed specs cache ***
*** Removed user source cache ***
*** Removed latest user source cache ***
*** Removed system source cache ***
*** Removed latest system source cache ***
$ gem query -r --source 'http://rubygems.org' -d -n '^hermes$'
*** REMOTE GEMS ***
hermes (0.2.1)
Authors: José Valim, Carlos Antônio da Silva
Rubyforge: http://rubyforge.org/projects/hermes
Homepage: http://github.com/plataformatec/hermes
A few testing facilities built on top of Capybara and
ActiveSupport::TestCase
$ gem query -r --source 'http://rubygems.org' -d -n '^heredoc_unindent$'
*** REMOTE GEMS ***
heredoc_unindent (1.1.1)
Author: Adriano Mitre
Rubyforge: http://rubyforge.org/projects/heredoc_unindent
Homepage: https://github.com/adrianomitre/heredoc_unindent
This gem removes common margin from indented strings, such as the
ones produced by indented heredocs
</pre>
<p>Thank you, Nick!</p></div>Adrianotag:help.rubygems.org,2010-01-19:Comment/49607882011-01-31T18:11:26Z2011-01-31T18:11:28Zconfused query descriptions<div><p>Unfortunately, not everyhing is quite right.</p>
<p>I am attaching a Ruby script that I made to fetch the
descriptions of all gems (it requires trollop and timeout). If I
try to fetch all the descriptions in a single run with
<code>./fetch.rb -f list.txt -v -i 0 -n 25000</code>, the
aforementioned "confusions" arise, even though I am forcing
<code>gem sources -c</code> between queries. (Run <code>./fetch
-h</code> for parameters description; <tt>list.txt</tt> is simply
the result of <code>gem query -r --source 'http://rubygems.org'
> list.txt</code>)</p>
<p>The only way I found to get reliable results was to limit the
number of queries per invokation to 100 queries, using <code>for j
in (seq 0 100 20000) ; ./fetch.rb -f list.txt -v -i $j -n 100 ;
end</code>. (I use fish shell, but it should be straightforward to
translate the loop.)</p>
<p>Any ideas? Should I open an issue at <a href=
"https://github.com/rubygems">https://github.com/rubygems</a>?</p></div>Adrianotag:help.rubygems.org,2010-01-19:Comment/49607882011-02-01T21:48:32Z2011-02-01T21:48:32Zconfused query descriptions<div><p>Can you run with -V to see which file was downloaded that's
causing the problem?</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/49607882011-02-01T21:51:42Z2011-02-01T21:51:44Zconfused query descriptions<div><p>Run what with -V? The roblem was not limited to a single file.
And it was not an exception, but silent and wrong/confused
results.</p></div>Adrianotag:help.rubygems.org,2010-01-19:Comment/49607882011-02-01T22:34:11Z2011-02-01T22:34:11Zconfused query descriptions<div><p>Add -V to qc.handle_options so when you find a mismatch you can
see which files were downloaded.</p></div>Eric Hodel