You don't need each, collect or select in Coffeescript
CoffeeScript for comprehensions replace _.each, _.map, and _.select for cleaner list processing without underscore helpers.
Installing therubyracer and libv8 with Ruby 1.8 on OSX Mavericks
Ruby 1.8 on OS X Mavericks can fail to build therubyracer and libv8 native extensions; updating the gems or linking a Homebrew V8 build can restore bundling.
safe_cookies is now in public beta
safe_cookies makes application cookies secure and HttpOnly, rewrites client cookies once, and flags unregistered or external cookies.
Managing vendor assets in Rails with Bower
Rails asset management becomes easier with bower-rails, using a Bowerfile and rake tasks to install, list, update, and rewrite vendored front-end packages.
A nicer way to run RSpec and/or Cucumber
Convenience scripts streamline RSpec and Cucumber runs with bundle exec, parallel execution, spinner support, and a full test check against regressions.
RubyMine: How to exclude single files
Exclude individual files from RubyMine search and navigation by adding filename masks in Project Structure settings.
Yarn: if integrity check won't let you start rails console
Yarn integrity warnings can block rails console even when packages are current; stale Spring cache may keep the error until spring stop clears it.
Fix: esbuild assets are missing after capistrano deploy
esbuild output can disappear after a Capistrano deploy when app/builds is not committed, leaving public/assets incomplete. Sprockets may ignore files in unknown paths.
What's in a View? A look at the alternatives
Tradeoffs between progressive enhancement with jQuery-style approaches and client-side views affect interactivity, complexity, and how much rendering stays on the server.
Using CSS3PIE cross-domain
Currently not possible as the linked .htc file contains JavaScript which is not explicitly called.
The developers are working on a pure JavaScript solution which will have some downsides but work across different domains.
jnicklas's capybara at master - GitHub
Capybara sets up some tags for you to use in Cucumber. Often you’ll want to run only some scenarios with a driver that supports JavaScript, Capybara makes this easy: simply tag the scenario (or feature) with @javascript:
Don't open user-supplied links with target="_blank"
Opening user-supplied links with target="_blank" can expose window.opener, enabling script access or location changes that support phishing. rel="noopener" reduces the risk in modern browsers.
Installation of therubyracer fails with "undefined method `include_path'"
therubyracer installation on Ruby 1.8 can fail when extconf.rb loads an incompatible libv8 version, causing a missing include_path method.
Webpacker: Side effects of using window.* within the ProvidePlugin
Using window.jQuery in ProvidePlugin can leave jQuery undefined in the browser while $ still works; assigning through global avoids the conflict.
Accessing Rails config in webpack(er)
Rails secrets and other configuration values can be read inside webpack bundles with rails-erb-loader, enabling environment-specific client-side settings without hardcoding them.
Fix Capistrano warnings: Missing public directories
Capistrano deployment warnings can appear when Rails asset pipeline apps lack empty public subdirectories. Placeholder files like .gitkeep suppress the missing-path errors.
Pay attention to the order of your submit buttons
If you have several submit elements (inputs or buttons with type="submit") that each cause different things to happen (e.g. you might have a button that sends an extra attribute) you might run into trouble when submitting the form by pressing the return key in a field.
When nothing fancy like a tabindex is defined it seems as if the first submit element inside a form is chosen (and has its attributes submitted) when pressing return.\
So, if possible, put your "default" (aka least harmful) submit element before others.
NB: If you s...
Check if a field or button is disabled with Cucumber
Check whether form controls or buttons are disabled in Cucumber step definitions, using label-based assertions on Capybara or Webrat elements.
Bower complains about missing NodeJS on Ubuntu
bower may fail on Ubuntu when /usr/bin/node is missing; using Ubuntu’s node package can also leave bower unresponsive. A symlink to nodejs fixes the mismatch.
Autofocus a form field with HTML5 or jQuery
Automatically placing the cursor in a form field improves first interaction and removes an extra click. HTML5 autofocus works in modern browsers; jQuery can provide a fallback.
How to fix webpack-dev-server not found
bin/webpack-dev-server can fail with Yarn's "Command "webpack-dev-server" not found" error when dependencies are missing; yarn install --check-files restores the command.
Service Worker series by GoMakeThings
Create offline-capable web apps with service workers, including caching, updates, and background control for better resilience and performance.
Asset pipeline: Precompile non-standard manifests
Non-standard asset manifests are not precompiled by default, so custom config.assets.precompile entries are needed for additional CSS and JS bundles.
Beware: Many browsers define window.event
Some browsers expose window.event, but Firefox and recent IE versions do not. Passing the handler’s event object avoids cross-browser failures and accidental global access.