Yarn: if integrity check won't let you start rails console

Yarn integrity warnings can block rails console even when packages are current; stale Spring cache may keep the error until spring stop clears it.

Passenger 5/6 requires a config.ru file to run Rails 2.3 projects

Rails 2.3 apps need a config.ru file for Passenger 5+; without it, nginx or Apache may return 403 errors because the app is not detected.

mca blog [de hÓra: "Just" Use Post]

Partial updates can break caching because cached copies of the original resource become invalid. Using POST instead of update semantics avoids this class of problems.

mca blog [REST Upside Down]

A new angle for understanding REST itself, beyond URLs and HTTP methods, uses a reversed perspective to help people grasp the style of web services.

How to avoid raising RestClient exceptions for 4xx or 5xx results

RestClient raises on expected 4xx and 5xx responses, but a block can return the RestClient::Response instead of throwing exceptions.

Downloading files from Ruby on Rails

Serving files as downloads in Ruby on Rails uses send_file; it returns the file directly and overrides the normal render response.

SSHKit 1.9.0 failure for Capistrano deploy

Capistrano deploys can crash in sshkit-1.9.0 with NoMethodError in pretty.rb; upgrading SSHKit to 1.21.0 resolves the failure.

mysqltuner.pl

Perl script for diagnosing MySQL databases and suggesting configuration changes to improve performance.

Enable debugging for BIND 9 on Ubuntu

BIND 9 can be run with console debugging on Ubuntu by adding -d 50 -g to the startup options, making DNS issues visible during restart.

Change the MySQL default character set on Amazon Relational Database Service (RDS)

MySQL character set defaults on Amazon RDS can require a custom parameter group and instance reboot to take effect.

Caching in Rails

Rails 2.3 caching can speed up pages and views, but stale output and missing authentication hooks make cache strategy and invalidation tricky.

How to: Use different configurations for S3cmd

Managing multiple S3cmd configurations reduces the risk of sending uploads and deletions to the wrong Amazon S3 bucket. Use separate config files or a symlink to switch between environments.

How to generate and test a htpasswd password hash

Create and verify bcrypt password hashes for Apache authentication, with safer handling than command-line password entry.

How to include Sidekiq job IDs in Rails logs

Sidekiq jobs lose request context in Rails logs, making parallel worker output hard to trace. Tagging log lines with worker class and jid keeps job activity readable.

AngularJS: How to force Content-Type on GET and DELETE requests

AngularJS strips Content-Type from blank-body GET and DELETE requests, which can break APIs that require it. Decorating $httpBackend can restore the header selectively.

Monitoring a network connection from a remote host

Network failures between a host and a single target can be isolated with ping checks and an automatic mtr report by email.

Jasmine: Mocking API requests in an Angular service spec

Angular service specs can hit real routes unless uiRouter startup is disabled; ngMock and $httpBackend let API requests be intercepted and asserted in Jasmine.

Things to consider when using Travis CI

Fragile CI builds on Travis often fail with Ruby 1.8.7, incompatible Rubygems, or debugger gems in the test bundle.

passenger problems with upgraded rails-app

Passenger may misdetect an upgraded Rails app as Rails 1/2 and fail to spawn it; a full Apache restart can load the new application settings correctly.

Deployment Script Spring Cleaning - GitHub

As we get ready to upgrade our servers I thought it’d be a good time to upgrade our deployment process. Currently pushing out a new version of GitHub takes upwards of 15 minutes. Ouch. My goal: one minute deploys (excluding server restart time).

Juggernaut

The Juggernaut plugin for Ruby on Rails aims to revolutionize your Rails app by letting the server initiate a connection and push data to the client. In other words your app can have a real time connection to the server with the advantage of instant updates.

Sailing down the Hudson with RVM - GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS

We recently decided our CI server needed an overhaul. I really enjoyed Integrity as a build server, but after trying out Hudson it’s hard to say I want to go back. Hudson has several huge advantages.

Capistrano 3 has slightly changed its symlink implementation

Capistrano 3 symlinks linked directories using the full path, so public/system now points to shared/public/system instead of shared/system.

Limiting CPU and memory resources of Paperclip convert jobs

Paperclip image conversions can spike CPU and memory during heavy uploads. ImageMagick resource limits and nice help reduce contention on Unix systems.