Capistrano: Delete old releases automatically
Capistrano keeps recent release folders on the server for rollback, and the retention count can be lowered with set :keep_releases, 3.
How to make your application assets cachable in Rails
Rails asset URLs need fingerprints or timestamps to let browsers cache images, stylesheets, and scripts long-term without serving stale files after updates.
How the Date Header Affects Cookie Expiration and Caching
Cookie expiry and HTTP cache lifetimes depend on the Date header when present; missing it can make mocked-time tests and browser caching behave inconsistently.
How to fix: "500 Internal Server Error" after adding Rack::Bug
Passenger and Apache can return 500 errors after adding Rack::Bug when the middleware is referenced as a string instead of loaded with require 'rack/bug'.
Caching may break relative paths in your merged stylesheet
Stylesheet caching can merge files from different folders and leave relative image paths pointing to the wrong location, so images work locally but fail on the server.
Render Sass stylesheets dynamically
Serve CSS at request time from Sass templates while keeping asset_path, imports, and injected theme colors available. Useful when styles need dynamic values without ERB preprocessing.
Connecting to MSSQL with Ruby on Ubuntu - lambie.org
Connecting Ruby on Ubuntu to Microsoft SQL Server can require nonstandard drivers and native libraries, especially for older SQL Server versions on Linux.
During deployment: "You are trying to install in deployment mode after changing your Gemfile"
Deployment can fail with a misleading Gemfile error when the server uses a newer Bundler than the version recorded in Gemfile.lock. Matching Bundler major versions on both sides prevents the install mismatch.
Err http://de.archive.ubuntu.com [...] 404 Not Found [IP: 141.30.13.20 80]
APT fails with 404 errors from an Ubuntu mirror while the network and server are fine; deleting the local package lists cache restores updates.
HTTP 302 redirects for PATCH or DELETE will not redirect with GET
Browsers may keep PATCH and DELETE on 302 redirects instead of switching to GET, breaking AJAX flows. Use 303 See Other or POST method override to force a GET follow-up.
Rails: Fixing ETags that never match
Rails default ETags often never repeat because rotating CSRF tokens and CSP nonces change response bytes, blocking cache hits and 304 responses.
Git instaweb
Git includes a built-in browser-based repository viewer for local inspection; git instaweb starts a temporary web server, with Apache or lighttpd support.
Understanding race conditions with duplicate unique keys in Rails
validates_uniqueness_of can still allow duplicate records under concurrent requests; a unique database constraint prevents the race and turns collisions into ActiveRecord::RecordNotUnique.
Refile: Ruby file uploads, take 3
Refile is a Rails gem for file uploads with better direct-to-S3 support than CarrierWave, but on-demand image rendering can increase server load and require caching or a CDN.
HTML5: Allow to choose multiple files with a vanilla file picker
Native file inputs can accept several uploads at once with multiple, but server parsing usually needs array-style names and custom Rails adaptation.
Ruby: How to fetch a remote host's TLS certificate
Fetch a remote server’s TLS certificate in Ruby without sending a full request. The certificate can be inspected, cached as PEM, and reloaded with OpenSSL::X509::Certificate.
Sunspot for Solr fails with '400 Bad Request' in 'adapt_response'
Sunspot can fail with 400 Bad Request in adapt_response when Solr uses the wrong schema. Copy Sunspot’s schema.xml into Solr’s config and restart the server.
Implementing authentication and authorization for ActiveStorage blobs/files
Rails ActiveStorage direct uploads are public by default, so unauthenticated users can flood storage and access sensitive blobs without ownership checks.
Restrict Apache access to your local computer
Apache development servers can accept connections from other machines on the network. Binding Listen to 127.0.0.1 limits access to the local computer.
VirtualBox host IP address and hostname
VirtualBox NAT guests can reach the host at 10.0.2.2; vbox.srv is the matching hostname for shared folders and host web server access.
terminator keyboard shortcuts
Manage many server sessions in terminator with split panes, window focus changes, and quick title editing using keyboard shortcuts.
SAML Single Logout (SLO)
SAML logout can be initiated by the service provider or identity provider, with browser redirects or backchannel POSTs; devise_saml_authenticatable needs specific Rails and Keycloak logout handling.
Webpack(er): A primer
Webpacker integrates webpack with Rails to bundle JavaScript, stylesheets, images, and other assets, with Yarn managing dependencies and loaders handling non-JavaScript files.
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.