Couldn't create database for ...
rake db:create fails when MySQL access or credentials are wrong, often because the configured user lacks permission to create the development database.
Solving "cannot remove Object::ClassMethods"
rake can fail with a misleading cannot remove Object::ClassMethods error when a hidden boot-time exception triggers Rails cleanup instead of the real cause.
Fixing Homebrew "Permission denied" issues
Homebrew can fail on first install when it cannot access /usr/local directories. Fixing ownership lets brew install run normally.
Dealing with Solr's "404 Not Found" response
Solr can start normally yet still return 404 Not Found when its log directory is not writable for the runtime user.
When Rails does not recognize Rake tasks in lib/tasks
Rake tasks in lib/tasks are ignored when the filename ends in .rb; Rails and Rake load them only from .rake files.
What's My DNS? Global DNS Propagation Checker
Check a hostname’s current IP address and DNS records against name servers worldwide to verify DNS propagation after zone changes.
Disable output when using cURL
curl still prints progress information when the response body is redirected; --silent suppresses all output for background jobs and scripts.
Make an HTTP request to a machine but fake the hostname
Send an HTTP 1.1 request to a specific machine while presenting a different host name, using curl --resolve or a manual Host header.
sstephenson/execjs - GitHub
Run JavaScript from Ruby without choosing a runtime manually; ExecJS automatically selects an available engine and returns results as Ruby objects.
We forked craken
Newer rake versions can break craken:install with a "can't convert Hash into String" error during deployments.
gpg encrypted backup fails in crontab
gpg backups can fail in cron jobs when they try to access /dev/tty, leaving empty backup files. Enabling --no-tty avoids the terminal prompt error.
Fixing "Lock obtain timed out: SimpleFSLock" for Solr
Solr update requests can fail with 500 errors when a stale Lucene write lock remains in the data directory, often from incorrect file ownership.
A few git tips you didn't know about
Advanced git commands and lesser-known workflows can speed up common tasks and reduce mistakes for experienced users.
Line wrap text from a Ubuntu Linux terminal
Wrap long terminal text at a fixed width with fold, echoing pasted input or writing wrapped output to a file.
Open a Nautilus window in your terminal's working directory
Open the file manager directly in the current terminal folder with nautilus . instead of navigating there manually.
Dragging a file into your terminal pastes the file path
Dragging files from Nautilus into a terminal inserts their full paths, including multiple files, without typing them manually.
Auto-generate state_machine graphs as PNG images
Generate visual state diagrams for models using state_machine with a rake task and Graphviz, producing PNG output for quick inspection.
"Address already in use" with autossh
autossh can fail with “Address already in use” when the tunnel port or monitoring ports are occupied by another process.
Defining custom errors in Ruby
Custom exception classes in Ruby can be defined with Class.new(StandardError) and referenced as namespaced constants.
How to install a frozen version of Firefox for your Selenium tests
Firefox updates can break Selenium and Cucumber tests; a separate unchanging browser copy avoids auto-updates, profile clashes, and window reuse.
Capistrano: Different usernames for each server
Capistrano deployments to multiple servers can fail when each host needs a different login; putting the username in the server definition avoids a global set :user setting.
Compose a regular expression from other RegExp objects
Build a Regexp from existing Regexp objects with interpolation, but backreferences like \1 can point to the wrong capture group after concatenation.
Turn off SSL for scenarios with Selenium
Selenium on WEBrick fails on HTTPS pages because the server does not speak SSL. Disabling SSL only for those scenarios avoids Cucumber browser test failures.
Machinist's #make breaks on has_many associations when defining method `empty?`
Custom empty? on a has_many model can break Machinist collection building, creating records with the wrong foreign key. Use explicit association assignment instead.