makandra dev
ocra.rubyforge.org

OCRA (One-Click Ruby Application) builds Windows executables from Ruby source code. The executable is a self-extracting, self-running...

Every time I started RubyMine, it opened the main window on the left monitor -- when moving it to the center...

All our projects have enum-like requirements like this: An attribute value must be included in a given set of...

Controller responses often include Javascript code that contains values from Ruby variables. E.g. you want to call a Javascript function...

An association defined with has_many :through will return the same record multiple times if multiple join models for the...

stackoverflow.com

This is for you if Passenger gives you the following useless error message. Passenger encountered the following error:\ The application...

weblog.jamisbuck.org

How to get a backtrace from a running Ruby process: Ruby 2.6 # First, find out the PID of your Ruby...

robots.thoughtbot.com

TL;DR {} binds stronger than do … end (as always in Ruby, special characters bind stronger than words) Demo

This card needs to be updated for Rails 3+. Since there is no --debugger flag you need to run:

The following two hints are taken from Github's Ruby style guide: If your regular expression mentions a lot of...

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.

stackoverflow.com

In some older Capybara versions (e.g. 0.3.9), we're getting lots of deprecations warnings: Selenium::WebDriver::Element#select is deprecated...

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.

This is surprisingly difficult when there is a with the same text on the page, but you really want to...

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

If you get this: Installing typhoeus (0.3.3) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem...

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

This only applies to RSpec below version 1.3.2. The issue has been fixed in RSpec 1.3.2, and most likely RSpec...

Under Settings / Appearance you can uncheck a box Animate windows. This will change your life. This setting seems to not...

Let's say you have two XML strings that are ordered differently but you don't care about the order...