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...

By default, Google Analytics tracks the current URL for every request. Sometimes you will want to track another URL instead...

In your ~/.gitconfig: [core] editor=nano

So you probably see the following error trace within your Passenger log file if you got here:

steamdev.com

zClip is a lightweight jQuery "copy to clipboard" plugin built using the popular Zero Clipboard library. This plugin uses an...

makandra dev
github.com

A small library to provide the Rails I18n translations in Javascript clients.

makandra dev
codemirror.net

CodeMirror is a JavaScript component that provides a code editor in the browser. When a mode is available for the...

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

bbs.archlinux.org

xterm by default uses black text on white background. To change that to something like "light gray on black", do...

stackoverflow.com

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

Make sure you call the methods in the following order and not vice versa: has_attached_file :image validates_attachment...

You can change which branches will be pushed when saying git push. Our recommendation is to set it to current...

The default behavior of Calc is that when you paste cells from the clipboard, it overwrites whatever cells occupy the...

wholemeal.co.nz

If you cannot install the gem 'RedCloth' via bundle install you might want to try the following. Specifying extra build...

An = is represented by =3D in the log file. I got confused by the leading 3D which is not part...

Geordi, our collection of command line tools, has been extended by another command deploy-to-production. This script encapsulates the...

You can define what will be printed by checking View -> Preview Page Breaks and then moving around the blue borders...

After installing Bundler 1.1 you will get the following warning when running tests: WARNING: Cucumber-rails required outside of env.rb...

weblog.jamisbuck.org

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

validates_acceptance_of :terms only works if terms is set to a value. The validation is skipped silently when terms...

When you create a new branch and push it to origin, you won't be tracking it. This means a...

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: