Using Passenger Standalone for development
Local development can use Passenger Standalone as a zero-configuration Ruby app server with SSL and production-like behavior, replacing Webrick or Thin.
Advantages of using appname.daho.im:3000 over localhost:3000
Using separate local hostnames avoids cookie clashes and logouts when switching between web apps on Rails development servers.
Debug SAML in development using a local keycloak server
Local Keycloak can emulate a SAML identity provider for development, letting SSO flows and attribute mapping be tested without waiting on an external IDP.
How to kill a Rails development server by force
A stuck Rails development server can keep port 3000 busy and trigger EADDRINUSE; lsof and kill -9 can force it down.
Know your Haml comments
Haml supports HTML comments that reach the browser and Ruby comments that stay server-side, with indentation errors causing confusing syntax failures.
Rails: Flagging all cookies as secure-only to pass a security audit
Secure cookies are often required by audits even when a Rails app already uses HTTPS and HSTS. A middleware can add the Secure flag to server-set cookies automatically.
Rails 3: Sending tempfiles for download
Temporary downloads can fail in Rails 3 when send_file triggers X-Sendfile and the web server cannot read files under /tmp. Using an allowed temp directory avoids 404 errors.
Setup Sidekiq and Redis
Sidekiq needs a Redis connection configured separately for client and server environments. A REDIS_URL constant and startup load path keep staging, production, and test settings consistent.
Threads and processes in a Capybara/Selenium session
Capybara/Selenium tests involve a test process, a server thread and a browser process, so blocking, stale time, and uncommitted transactions can cause seemingly impossible failures.
How to enable SSL in development with Passenger standalone
Local Rails development can serve both HTTP and HTTPS with Passenger standalone by enabling SSL and using a self-signed certificate.
Video transcoding: Web and native playback overview (April 2020)
Browser video playback depends on container and codec support; MP4 with H.264 and AAC works broadly, while WebM can serve modern clients and downloads need native playback support.
When upgrading/downgrading RubyGems and Bundler on a server, you must clear bundled gems
Changing RubyGems or Bundler versions on servers can leave deployed gems and binstubs incompatible; clearing the shared bundle path forces reinstall and avoids boot failures.
Debugging Capistrano
Capistrano 3’s doctor task checks Ruby, Rubygems and Bundler versions, installed Capistrano gems, config variables and server settings.
jQuery and cross domain AJAX requests
Cross-domain AJAX requests with jQuery suppress X-Requested-With and CSRF headers for security, so servers may not recognize them as AJAX. A prefilter can re-enable headers for trusted hosts.
Carrierwave: How to migrate to another folder structure
Large attachment trees slow directory listings and waste time; CarrierWave can serve old and new paths during a staged move to a hierarchical layout.
Terminator setup for Procfile-based applications for more comfortable debugging
Terminator can split Rails debugging into separate panes, keeping the web server and other Procfile processes visible without mixed log output.
Linux Performance Analysis in 60,000 Milliseconds
A Linux server with a performance issue needs fast triage in the first minute. Core commands reveal load, memory, CPU, disk, network, and process bottlenecks.
Capistrano 2: How to deploy a single server
Deploy a single server from a multi-server Capistrano setup by using HOSTFILTER to target one host and skip irrelevant tasks.
Using ffmpeg as a HLS streaming server
Live HLS streaming with ffmpeg can serve as a lightweight server for segmented video delivery, multiple bitrates, and lower playback delay.
When does Webpacker compile?
Webpacker compiles assets on demand in Rails, which can freeze helpers and slow page reloads when no dev server is running.
Exploring the disk usage with ncdu
Finds large files and directories consuming disk space on servers or minimal systems with a text-based interface.
Capistrano task to tail remote application logs of multiple servers
Monitor logs across multiple app servers from one terminal and avoid missing per-host errors; LOG selects another file, and terminal line truncation can hide long entries.
How to: Restart vnc server for geordi
VNC viewer startup can fail with “Connection refused” when the geordi session server on display :17 is hung or still locked. Restarting the server and removing the stale lock file restores access.
How to fix "unknown role" errors in Capistrano recipes
Capistrano multistage recipes can fail with unknown role errors when a task targets a missing server group. Registering the role and skipping the task when no servers match prevents the failure.