<p>I'd like to create a progress bar to indicate the status of an a batch job in <code>Ruby</code>. </p>

<p>I've read some <a href="http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/" rel="noreferrer" title="NCURSES Programming HOWTO">tutorials</a> / <a href="http://ncurses-ruby.berlios.de/" rel="noreferrer" title="ncurses-ruby">libraries</a> on using <em>(n)curses</em>, none of which were particularly helpful in explaining how to create an <em>"animated"</em> progress bar in the terminal or using curses with <code>Ruby</code>. </p>

<p>I'm already aware of using a separate thread to monitor the progress of a given job, I'm just not sure how to proceed with drawing a progress bar. </p>

<hr>

<p><strong>Update</strong>  </p>

<p><a href="http://0xcc.net/ruby-progressbar/" rel="noreferrer" title="ruby-progressbar">ProgressBar</a> class was incredibly straight-forward, perfectly solved my problem.</p>

[{'answer_id': 1318, 'author': 'Joey deVilla', 'author_id': 216, 'author_profile': 'https://Stackoverflow.com/users/216', 'pm_score': 5, 'selected': True, 'text': '<p>You might be able to get some implementation ideas from the <a href="http://0xcc.net/ruby-progressbar/" rel="noreferrer" title="Ruby/ProgressBar">Ruby/ProgressBar library</a>, which generates text progress bars. I stumbled across it a couple of months back but haven\'t made any use of it.</p>\n'}, {'answer_id': 1375, 'author': 'Michiel de Mare', 'author_id': 136, 'author_profile': 'https://Stackoverflow.com/users/136', 'pm_score': 2, 'selected': False, 'text': '<p>On windows, curses works out of the box, ncurses doesn\'t, and for a progress bar curses should be sufficient. So, use curses instead of ncurses.</p>\n\n<p>Also, both curses and ncurses are wafer-thin wrappers around the c library - that means you don\'t really need Ruby-specific tutorials.</p>\n\n<p>However, on the <a href="http://www.pragprog.com/titles/ruby/source_code" rel="nofollow noreferrer">site for the PickAxe</a> you can download all the code examples for the book. The file "ex1423.rb" contains a curses demo which plays Pong - that should give you plenty of material to get you going.</p>\n'}, {'answer_id': 1378, 'author': 'sparkes', 'author_id': 269, 'author_profile': 'https://Stackoverflow.com/users/269', 'pm_score': 2, 'selected': False, 'text': '<p>Personally I think curses is overkill in this case.  While the curses lib is nice (and I frequently use it myself) it\'s a PITA to relearn every time I haven\'t needed it for 12 months which has to be the sign of a bad interface design.</p>\n\n<p>If for some reason you can\'t get on with <a href="https://stackoverflow.com/questions/1306/#1318">the progress bar lib Joey suggested</a> roll your own and release it under a pretty free licence for instant kudos :)</p>\n'}, {'answer_id': 4392562, 'author': 'tig', 'author_id': 96823, 'author_profile': 'https://Stackoverflow.com/users/96823', 'pm_score': 2, 'selected': False, 'text': '<p>Very late answer and sorry for self promotion, but I created <a href="https://rubygems.org/gems/progress" rel="noreferrer">library</a> to show progress in terminal.</p>\n'}]
['https://Stackoverflow.com/questions/1306', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/302/']