stackoverflow.com

This will give you the string that appears most often in an array: names = %w[ foo foo bar bar bar...

Capybara has a global option (Capybara.ignore_hidden_elements) that determines whether Capybara sees or ignores hidden elements.

After you configured your ODBC describe in Fix [RubyODBC]Cannot allocate SQLHENV when connecting to MSSQL 2005 with Ruby 1.8.7...

I followed this nice guide Connecting to MSSQL with Ruby on Ubuntu - lambie.org until I ran in the following errors...

slate.com

Nice article to educate your non-geek girlfriend/boyfriend about the joys of programming.

github.com

Pour color on your Rails console with awesome_print. Turn confusing long strings into formatted output. Have objects and classes...

Install libreadline: sudo apt-get install libreadline-dev Reinstall the ruby and tell rvm where to find readline

Your current ruby must be Ruby Enterprise. gem install passenger passenger-install-apache2-module Edit your httpd.conf according to the...

makandra dev

When you are calling a method that may raise an exception that you don't care about, you might think...

REST Client is a nice, simple HTTP client library for Ruby. When you do a simple GET request like that...

makandra dev

Copy the attached file to config/initializers/indent_string.rb and you can say "foo".indent(4) # " foo" Note you will find many simpler...

Imagine you have a piece of code that tries to send a request to a remote server. Now the server...

makandra dev
github.com

ProgressBar is a simple Ruby library for displaying progress of long-running tasks on the console. It is intended to...

makandra dev
github.com

Gem to get Ruby 1.9 features in Ruby 1.8.

makandra dev
github.com

Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.

makandra dev

This note summarizes the ruby exception hierarchy. Exception NoMemoryError ScriptError LoadError NotImplementedError SyntaxError SignalException Interrupt Timeout::Error # < ruby 1.9.2 StandardError...

Using .downcase or .upcase on strings containing umlauts does not work as expected in Ruby versions before 2.4. It leaves...

When selecting records in a date range, take care not to do it like this: start_date = Date.parse('2007-05...

Although it's tempting flirt with detecting mobile/touch devices with CSS media queries or Javascript feature detection alone, this approach...

github.com

Note: capistrano_colors was merged into Capistrano starting from v2.13.5. However, this requires Ruby 1.9+. If you cannot upgrade Capistrano...

makandra dev
github.com

Ruby bindings for Sundown, a fast and full-featured Markdown parser that lets you define renders for arbitrary output formats...

jstorimer.com

Guide to writing CLI scripts in Ruby that play nice with pipe chains.

github.com

When Rack::Bug has been added to your project and your Apache2/Passenger only replies with an Error 500 (Internal Server...

github.com

Framework to write command-line apps in Ruby. Comes with a nice way of processing parameter options, some utility classes...