Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby/ProgressBar is a text progress bar library for Ruby.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 GPL_LICENSE
Octocat-spinner-32 RUBY_LICENSE
Octocat-spinner-32 ruby-progressbar.gemspec
Octocat-spinner-32 test.rb


Ruby/ProgressBar is a text progress bar library for Ruby.

It can indicate progress with percentage, a progress bar, and estimated remaining time.

Documentation is available at


Basic functionality:

% irb --simple-prompt -r progressbar
>> pbar ="test", 100)
=> (ProgressBar: 0/100)
>> 100.times {sleep(0.1);}; pbar.finish
test:          100% |oooooooooooooooooooooooooooooooooooooooo| Time: 00:00:10
=> nil

Set position directly:

>> pbar ="test", 100)
=> (ProgressBar: 0/100)
>> (1..100).each{|x| sleep(0.1); pbar.set(x)}; pbar.finish
test:           67% |oooooooooooooooooooooooooo              | ETA:  00:00:03

Block mode:

>> ProgressBar.block('test',100) do |pbar|
>>   100.times { sleep(0.1); }
>> end

Even simpler:

>> (1..100).to_a.each_with_progressbar('test') do
>>   sleep 0.1
>> end


gem install ruby-progressbar


Since the progress is calculated by the proportion to the total cost of processing, Ruby/ProgressBar cannot be used if the total cost of processing is unknown in advance. Moreover, the estimation of remaining time cannot be accurately performed if the progress does not flow uniformly.

Satoru Takabayashi

Cleaned up by Leonid Shevtsov

Something went wrong with that request. Please try again.