Progress Bar During Downloads #2

wants to merge 6 commits into


None yet
4 participants

ryanmelt commented Sep 25, 2010

Hello all,
This pull request brings in a progress bar that will be displayed while downloading gems. This is particularly useful when downloading large gems such as qtbindings on Windows. If the extra STDOUT output is undesirable, it would be easy to modify it to only output for large files (maybe > 1 Mb?). I like the feedback for all file sizes personally. Let me know what you think.
Ryan Melton


luislavena commented Sep 26, 2010

I like it, however I'm not sure of including ProgressBar globally.

Saying this because there is a progressbar gem: and it might clash.

Rubinius guys did a simple implementation:

That did not depend on the the additional class.

We also need to check how this could affect the automated output, specially for projects like Bundler and such.



ryanmelt commented Sep 28, 2010

I added the progressbar class to the gem namespace, so it shouldn't conflict with anything now.


luislavena commented Sep 28, 2010


I think the good idea will be remove ProgressBar at all.

Also, all the remote operations are been handled by this, so fetching of specs and everything is streamed.

There is also another problem, it doesn't work with 1.8.7:

Downloading latest_specs.4.8.gz
ERROR:  While executing gem ... (NoMethodError)oooooooooooooooo| ETA:  00:00:00
    undefined method `body=' for #Net::HTTPOK 200 OK readbody=true

Tested with ruby -Ilib bin/gem fetch qtbindings

See my patch to only generate the progress report when a gem is being downloaded:


ryanmelt commented Sep 29, 2010

I updated it to remove the progressbar class and to use a single line that gets redrawn as suggested in your gist. Also updated to work with 1.8.7.


luislavena commented Sep 29, 2010

Thank you Ryan

Posted about this to rubygems-devel:

Waiting for feedback there before decide to integrate it.


ryanmelt commented Oct 10, 2010

Hi Luis, I believe I addressed your issue of using print and flush directly by wrapping them in say-like statements. As no one has commented, can we get this incorporated?


luislavena commented Oct 11, 2010

Hello Ryan.

I bring this topic to RubyGems about making the progress bar something part of UI component to have better control of it.

Also, this print/flush approach do not work nice with remote automations like Chef, so move of this to the UI and have an option to turn it of will be the best.

See my thread and further comments there:

This should be integrated, but to my bad, I'm not 100 percent sure on the approach and to my bad haven't received the feedback from other RubyGems maintainers

Will keep you posted.


luislavena commented Nov 20, 2010

Hello Ryan,

I'm working today on extend UserInteraction to support a configurable Download reporter, in that way, it will make more easy for non-tty interfaces to work and not generate a bunch of output.

Thank you again for your contribution. Will post a link to the commits once I'm done for you to test and review.


qrush commented Dec 10, 2010

Been wanting this forever. Any kind of feedback when gem install happens would be AWESOME.


zenspider commented Dec 10, 2010

I defer to Luis (who needs to stop deferring to the list).


luislavena commented Dec 27, 2010

Hello guys,

I've posted this to the list for review:

I've implemented Ryan idea into a more modular and non-tty friendly version under download-reporter branch:

Let me know your thoughts guys.


luislavena commented Dec 29, 2010

Hello Guys,

Wanted to let you know this has been merged into master (slightly different code, same idea) into master:


Closing this out.

Ryan, thank you for your contribution, patience and initial code for this implementation.

@nobu nobu pushed a commit to nobu/rubygems that referenced this pull request Jan 12, 2014

@nurse nurse Merge pull request #2 from mrkn/fix_for_r40067
Fix for r40067

jfeng5150 referenced this pull request Oct 31, 2014


gem install rails issue #1055

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment