Running Selenium tests with Ruby on Centos

October 19, 2014 · Posted in Development · Comment 

This posts shows how to run Selenium tests on Centos. Tests written on Ruby will use Selenium WebDriver API to run the browser directly. We don’t need to install Selenium Server because selenium tests will be executed locally against Firefox browser on the same server (Centos).

Read more

How to pass multiple attributes to find_or_create_by in Rails 3 : the Ruby way

March 23, 2012 · Posted in Development · Comment 

Ruby and Rails have many magic features like blocks/closures, duck typing/mix-ins/modules,  method_missing, poetry mode.

One of the common tasks in programming web applications on Rails is finding a row in a table by several columns and creating a new row in case of row is missing.

Read more

Ruby metaprogramming and own custom attr_accessor

March 3, 2012 · Posted in Development · 10 Comments 

Ruby is a dynamic language, that’s why you won’t get compile time type warnings/errors as you get in languages like C#.

Ruby has a lot of metaprogramming features allowing you to create your own custom methods on the fly which can be used the same as att_accessor.

Read more

PHP vs Ruby vs Python (Infographic)

January 23, 2012 · Posted in Development · Comment 

Read more

Regular Expressions in Ruby

January 17, 2012 · Posted in Development · Comment 


Ruby uses Perl-compatible regular expressions, so if you’re familiar with the preg_*functions in PHP, it will be easy to learn regular expressions in Ruby.

Read more

Installing mysql2 gem on Ruby 1.9.2 and Rails 3.0.5 on Windows

December 22, 2011 · Posted in Development · 5 Comments 

When running ‘rake db:create’, you may get the following error:

>rake db:create
rake aborted!
126: The specified module could not be found. - d:/RailsInstaller/Ruby1.9.2/li

or may get these errors while installing mysql:

rake aborted !
uninitialized constant mysql2

Error ‘uninitialized constant mysql2′ comes when mysql2 installation is not done properly.

Read more