When Balsamiq Mockups won't let you load an image file
Image import can fail in Balsamiq Mockups when a file with the same name already exists in the project folder, blocking the load.
How to accept or deny JavaScript confirmation dialogs in Capybara/Selenium
JavaScript confirmation dialogs in Capybara/Selenium can block tests or auto-dismiss unexpectedly. Direct alert handling restores accept, dismiss, and text access.
ActiveRecord 3+ auto-converts times to UTC by default. Hilarity ensues.
Rails 3 auto-converts ActiveRecord times to UTC by default, which can break code using Time.now or Time.parse; local time and non-aware attributes restore the older behavior.
Rendering a custom 404 page in Rails 2
Custom handling for missing records in Rails 2 can render a branded 404 page instead of a generic exception when ActiveRecord::RecordNotFound occurs.
mojombo/grit - GitHub
Ruby library for object-oriented read and write access to Git repositories.
Let a Rails 3 application make a request to itself
Rails 3 can issue internal HTTP requests through the Rack interface, useful for Cucumber features and testing app responses without a browser.
When Rails no longer renders changes in view templates or Sass stylesheets
Cached pages in development can prevent Rails from rendering updated view templates or Sass stylesheets, especially when stale files remain in public/.
Rails 3.1.0 has been released!
Rails 3.1 adds jQuery by default, streaming responses, role-based attr_accessible, prepared statements, and simpler migrations.
Web Upd8: Ubuntu / Linux blog
Daily Ubuntu, Linux and GNOME news with practical HOWTOs for users who want updates and troubleshooting help.
Ruby: Convert a time string to your local time zone
Parsing a time string with a time zone converts it to local time automatically; Time.parse needs time or tzinfo to be available.
Windows 7: Open terminal from Explorer
Open a cmd prompt directly in the current Explorer folder using a built-in Windows 7 shortcut from the context menu.
Fix: "undefined method `bytesize' for #<Array>"
WEBrick can mask Rails startup failures with undefined method bytesize for #<Array>, hiding the real cause until logs are checked or another server is used.
Use different code for Rails 2 and Rails 3
Reusable Ruby code can need different behavior across Rails 2 and Rails 3+. Version checks let code branch cleanly for compatibility.
Install the DeaDBeeF music player under Ubuntu Linux
DeaDBeeF is a lightweight music player for Linux users who want an alternative to the default playback app. Installation is available for Ubuntu systems.
Always show all form errors during development
Forms can fail validation without visible feedback when the offending field has no input. A development-only error box keeps all form errors visible without leaving debug markup behind.
Let Webrat make a POST request
Webrat can submit a page request as POST by passing :post to visit, useful when a path must be tested with form-style submission.
Webrat doesn't follow redirect because it considers the url external
Absolute URLs in Rails tests can be treated as external because the host is unknown, breaking redirect handling in Webrat. Use path-only matching or reset Webrat to the local site.
Timecop creates records in the past after calling Timecop.freeze
Timecop 0.3.4 and earlier can create records with timestamps in the past after Timecop.freeze; upgrading to 0.3.5 avoids the bug.
Time#utc, Time#gmt and Time#localtime are destructive methods
Time#utc, Time#gmt and Time#localtime mutate the receiver instead of returning a converted copy, which can cause hidden side effects in shared Time objects.
Convert the colorspace of a PDF from RGB to CMYK under Ubuntu Linux
RGB-to-CMYK PDF conversion usually changes colors because no exact mapping exists; Ghostscript can rewrite the file with CMYK output on Ubuntu Linux.
Rotate a PDF under Ubuntu Linux
Incorrectly oriented PDF pages can be fixed on Ubuntu with pdftk by applying page rotation during output generation.
Fix: Tail says "no space left on device"
tail -f can fail with “no space left on device” when Linux inotify watches are exhausted, often by daemons like Dropbox. Raising fs.inotify.max_user_watches restores file following.
Fix Rubygems warning: Gem.source_index is deprecated, use Specification
Rubygems updates can flood legacy Rails apps with Gem::SourceIndex deprecation warnings. SlimGems or upgrading Rails 2.3.11 to 2.3.12+ reduces the noise.
Who broke the build?
Jenkins build failures trigger an automatic foam missile counter-attack aimed at the developer who broke the build.