Given those modules: module A def foo; end def bar; end end module B end When you want to call...
Given group size If you would like to split a Ruby array into pairs of two, you can use the...
This might be due to AppArmor denying the MySQL server access to most of the filesystem. You can instead use...
There are times when you need to send SQL to the database, like this: def self.some_count(field) field = connection.quote...
This card describes a Cucumber step that lets you say: When I perform basic authentication as "username/password" and I visit...
When defining a trait using the Modularity gem, you must take extra steps to define constants to avoid caveats (like...
In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server...
Are you adding a "Then show me the page" and re-run Cucumber whenever there is a failing scenario? Don...
From time to time we're convinced that an error must be very close to the network card, OS IP...
It's that simple to allow one of your Linux users to run a single command as UID 0:
This is for those who already own an SSL certificate (e.g. using it in the Apache HTTP Server) and need...
You cannot use Array#join on an array of strings where some strings are html_safe and others are not...
If you want your application to display properly on iPad, iPhone or Android there are two things to do:
Call geordi clean from a project root to remove unused and unnecessary files inside it. This script is part of...
Update: This trick probably isn't very useful anymore in Ruby 2.x. The Ruby GC has improved a lot...
In January this year (2010), Gmail switched to using HTTPS for everything by default. Previously it had been introduced as...
The following Sass will do the trick: button, input[type="reset"], input[type="button"], input[type="submit"], input[type="file...
Git allows you to do a binary search across commits to hunt down the commit that introduced a bug.
When your site is mapped into the URL-space of another server using mod_proxy, ProxyPass and ProxyPassReverse, all requests...
The step definitions below allow you to write this in both Webrat and Capybara: When I follow "Download as PDF...
If you need to find out which of your local commits are not on the remote server do this:
In regular expressions you can use the zero-width pattern \b to match the beginning or end of a word...
You configured authentication in your Apache configuration that requires username and password but you want a single IP address, host...
In RSpec 2 shared_examples_for can have parameters. You can simply hand over arguments from it_behaves...