When you write a custom RSpec matcher a good place to store them is to create one file per matcher...

When using ActionMailer, you can set an array of email addresses as recipients. If this array is generated by e.g...

If you just upgraded to Bundler 10.0.10 you might get the following error when bringing up Rails: /usr/lib/ruby/1.9.1/psych.rb:148:in...

Sometimes you can make your life easier by not allowing a record attribute to be changed after the record was...

ActiveRecord comes with a method touch which sets the updated_at timestamp to the current time. Unfortunately it also runs...

Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2

Sometimes you need to dynamically load an image and do something as soon as its loaded (when for example its...

Add deprecation warnings and their solution or link to available solutions. Global access to Rake DSL methods is deprecated. Please...

The attached RSpec matcher exist_in_database checks if a given record still exists in the database and has not...

When you need to insert many records into the same table, performance may become an issue. What you can do...

You can find ActiveRecord models by using a Range as its conditions: User.scoped(:conditions => { :id => 3..5 }) This will generate...

If you have the following deprecation warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated...

You will occasionally need to clean out your database while keeping the schema intact, e.g. when someone inserted data in...

api.jquery.com

jQuery offers many different methods to move a selection through the DOM tree. These are the most important: $element.find(selector...

When you set both a record's association and that association's foreign key attribute, Rails does not realize you...

If you have content inside a page that is hidden by CSS, the following will work with Selenium, but not...

Sometimes you might want to know if an attribute is an associated object or a simple string, integer etc. You...

MySQL's MIN and MAX functions are for aggregations only. This will not work and produce an error:

Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.

makandra dev
imagemagick.org

Paperclip uses the imagemagick resize options like 100x50> , 100x50<, 100x50# etc to resize images. See the link what options are...

web.archive.org

When you have a Cucumber step like Then I should see "Did you see those \"quotation marks\" over there...

makandra dev
wiki.debian.org

This note is a reminder that there is something called AppArmor that could cause weird errors ("File not found", "Can...

On 32bit systems, the maximum representable Time is 2038-01-19 03:14:07 in UTC or 2038-01-19...

Have a backup. Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to...