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'.
PostgreSQL: Importing dumps created with newer versions
Loading a pg_dump file can fail with unsupported dump format versions when pg_restore is older than the dump creator. Installing a newer PostgreSQL client and connecting through localhost resolves the mismatch.
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.
Terminator: do not broadcast to other windows
Broadcasted input in Terminator can reach other running windows and create dangerous side effects. Disabling the DBus server keeps Alt+a broadcasting local to the current terminal.
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.
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.
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.
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.
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.
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.
Use find_in_batches or find_each to deal with many records efficiently
Processing large record sets can exhaust memory when loading everything at once. find_in_batches and find_each keep memory usage lower for long-running data updates.
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.
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.
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.
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.