ruby
ruby
ruby
Adding colors to your Ruby scripts and console logs: A Developer's guide
Colored terminal output in Ruby takes a few lines: extend String with ANSI escape methods like red, green, and bold, add colorized logging to the Rails logger, or reach for a gem when you need more. Copy-paste snippets for scripts and console logs.
chrome
How to solve Selenium::WebDriver::Error::ScriptTimeoutError: script timeout
Selenium::WebDriver::Error::ScriptTimeoutError in Capybara system tests often appears after a Chrome driver update, and the culprit is default_max_wait_time set to zero for non-headless debugging. Why the error happens and the one-line config change that fixes it.
Latest
Anonymous Arguments Passing Improvements in Ruby 3.2
Ruby 3.2 adds new syntax for anonymous arguments: forward positional and keyword arguments with bare * and ** and unpack them inside the method, no more digging through kwargs hashes. A before-and-after example shows how much cleaner argument passing gets.
How to debug cookies in Rails and how to solve CookieOverflow issue
Rails CookieOverflow strikes when a cookie exceeds 4096 bytes. How to inspect cookies in Chrome dev tools, read the session dump on the error page, and use the cookie_debugger gem to log exactly which session key is eating the space, even in production.