Practical solutions

Ruby Howtos How-To Guides

Solve the problem. Keep building. Collection of Ruby how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Remove Duplicates From a Ruby ArrayThis article demonstrates the methods remove duplicates from an array in Ruby such as the uniq method, set operations, etc. How to List File in Folder in RubyThis articles introduces different ways to list all files in a particular folder in Ruby. How to Convert String to Integer in RubyWe will demonstrate the different ways to convert string to integers in Ruby. How to Replace Strings in RubyThis article will explain the steps in replacing strings in Ruby. Ruby's replace method is a handy way to substitute one string for another. How to Rename a File in RubyAt the end of this tutorial, we should be able to rename files using the Ruby framework. How to Generate Random Number in RubyIn this article, we will explain how to create random numbers in Ruby. In Ruby, the rand method generates a random number. How to Output Array to CSV in RubyIn this tutorial, we want to learn how to organize data in an array into a CSV format. The do Keyword in RubyThis article shows how to use the do keyword in Ruby. Not Equal Operator in RubyThis post focuses on the Ruby not equal operator. If you want to examine whether two values are not equal, you can use the != operator. This operator compares two object references for inequality. Difference Between OR and Double Pipe Operator in RubyThis tutorial highlights the difference between OR and double pipe operators in Ruby. Attr Accessor in RubyThis article shows how to use attr_accessor in Ruby Understanding Class << Self in RubyThe tutorial will shortly discuss what are the different methods in Ruby OOP and its implementation. try...catch in RubyThis article shows how to rescue exceptions in Ruby.