An Input Bug in Ruby

Posted on Aug 06, 2012 in Computer Science • Tagged with programming, Bash, Ruby, bug, terminal, IO

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

If you run a ruby program though Bash and the ruby program read multiple inputs from the console, all inputs will be the same as the first …


Continue reading

Send Email in Ruby

Posted on Jun 06, 2012 in Computer Science • Tagged with smtp, programming, Verizon, PDF, Ruby, email

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

A few days ago, I started writing my first Ruby program which read my Verizon family plan statements, calculate bills for each member and send emails to …


Continue reading

Tips on the Ruby Programming Language

Posted on Aug 06, 2012 in Computer Science • Tagged with array, IO, Ruby, programming, string

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Array

  1. The method push inserts an element to the back of the arry; the method insert inserts an element to any place of the array.

  2. The method …


Continue reading

Read PDF in Ruby

Posted on Jun 18, 2012 in Computer Science • Tagged with library, programming, package, PDF, Ruby

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

"pdf-reader" is a good Ruby libary for reading pdf document. You can install it via RubyGems using the following command.

sudo gem install pdf-reader

You have to …


Continue reading

Load User-written Script into Ruby

Posted on Aug 25, 2012 in Computer Science • Tagged with search path, require, programming, load, package, Ruby

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

By default the current working directoly is not in the search path of Ruby. To load a user-written script named "script.rb" into Ruby, you can use …


Continue reading