rake spec + rails_admin = weirdly failing specs
rails_admin specs can pass with rspec but fail under rake spec; setting ENV['SKIP_RAILS_ADMIN_INITIALIZER'] = 'false' in spec_helper restores the initializer.
Debugging Google Analytics
Analytics tracking can be hard to verify in the browser; a Chrome extension swaps in a debug version and prints tracking details to the JavaScript console.
Rspec_spinner or cucumber_spinner get into an infinite loop
mathn can make rspec_spinner and cucumber_spinner loop forever while rendering the progress bar.
Check apache config files' syntax
Validate Apache configuration syntax with apache2ctl configtest or apache2ctl -t; passing checks do not guarantee a successful server start.
Pre-releasing a Ruby gem
Release candidate and beta gem versions are treated as pre-releases and are ignored unless explicitly requested; RubyGems converts dash-separated SemVer pre-release tags to dot-separated versions.
Pre-releasing an npm package
Publish npm pre-release versions on a separate tag so stable users do not receive alpha or beta builds by default.
Debian/Ubuntu: See what "apt" would install without actually doing it
Check which packages and versions apt would install before making changes. --dry-run simulates upgrades without touching the system.
You can now override all Spreewald steps with more specific versions
Avoid Cucumber::Ambiguous by defining a more specific step that overrides a generic one in Spreewald 1.5.0+.
Machinist blueprints do not work with a column :display
display conflicts with a reserved Machinist blueprint name, so a blueprint attribute using that label may fail unexpectedly.
Background - cucumber - GitHub
Shared setup adds context to scenarios in a feature and runs before each scenario, after Before hooks.
Webmock < 3.12.1 cannot handle IPv6 addresses correctly
WebMock fails on IPv6 URLs because addresses need brackets before the port, causing invalid URI and port parsing errors in CarrierWave and SsrfFilter.
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.
A few recent CSS properties
Modern CSS features improve progressive enhancement, visual effects, touch handling, and scroll behavior across browser support levels.
Use Capybara commands inside an IFRAME
Interact with forms and buttons in embedded web pages by switching Capybara into an iframe; the same pattern also works for reusable Cucumber steps.
RSpec 1.x matcher for delegations
Custom RSpec matcher for verifying delegated methods in Ruby models, including prefixed delegation like author_name.
Strong params: Raise in development if unpermitted params are found
Unpermitted request data can slip into Rails controllers unless action_on_unpermitted_parameters is set to log or raise; development can fail fast on unexpected keys.
PostgreSQL: How to add/remove/modify array values (and how to replace 1 value with multiple values)
Manipulating PostgreSQL array columns can be awkward: values can be appended, removed, or replaced, with special handling for multi-value substitutions.
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.
RSpec: How to get a full backtrace
Use rspec -b to print a full backtrace for failing examples and make the origin of an error easier to trace.
Auto-generate Cucumber navigation paths
Cucumber step definitions can map natural-language destinations to Rails route helpers, including list, new, edit, and record lookup paths.
Consul 0.4.0 released
Consul 0.4.0 adds temporary power switching, support for Ruby collections and arbitrary objects as powers, and drops the ActiveSupport::Memoizable dependency.
Multi-line step arguments in Cucumber
Passing long text blocks to Cucumber steps keeps feature files readable while preserving full Markdown content for step definitions.
Why stubbing on associated records does not always work as expected
Stubbing methods on associated records can fail because belongs_to returns an association proxy, not the target object; stub the caller or the association explicitly.
Advice: Reduce scopes with joins to simple IN-queries
JOIN-heavy scopes become brittle when callers chain more conditions or associations. Converting them to a simple IN query preserves chaining and avoids unexpected SQL side effects.