If you want to test that a certain text is contained within the document title of your page, you can...

rubyforge.org

Under certain circumstances gettext_i18n_rails will hit a near-infinite loop. This occured in Rails 2.3.5 with Haml 3.0.18...

...returns Promise.reject("error") await foo() // throws "error" As an alternative you can use the behavior that exceptions thrown in promise callbacks will automatically be caught and converted to a rejected...

throw "No x given" } else return new Promise(function(resolve, reject) { ... }); } }); } This behavior is in all Promises/A+ compatible implementations like native promises, jQuery 3+ deferreds or Bluebird. Deferreds...

Unless you changed the default, this will be 16 MB: mysql> SHOW VARIABLES WHERE Variable_name="max_allowed_packet"; +--------------------+----------+

hacks.mozilla.org

...previously been disabled for web pages, but with Firefox 41, which is currently in Beta, and slated to move to release in mid-September, it is becoming available to JavaScript...

makandra dev
github.com

The debugger gem does not seem to be properly working on Ruby 2. Use byebug instead! Byebug is a simple...

LibreOffice Impress, Writer, etc. doesn't embed most fonts into the PDFs it generates. This means if you share a...

When you build a link for an email body like this body = "Please click the following link" body << "http://posts/130...

For Capybara, use this step: Then /^"([^"]*)" should be a disabled option for "([^"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector| with_scope(selector...

blog.codeclimate.com

...are knowledgeable and genuinely concerned with security. However, there are places where the default behavior could be more secure. This post explores potential security issues in Rails 3 that are...

When your Solr seems to be started properly (a process is running with the correct data directory) but never responds...

github.com

...to be "by design" since there is a Bundler config option to restore previous behavior. You can fix it by setting that flag. You should commit the resulting config file...

In Ruby 2.3 you can use <<~ instead of <<- to automatically remove indentation from a HEREDOCs: str = <<~MESSAGE Hello Universe!

Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is...

hackernoon.com

CSS Flexbox has become extremely popular amongst front-end developers the last couple of years. This isn’t surprising, as it has made it a lot easier for us to...

...got a lot of the same capabilities as Flexbox. In come cases it’s better than Flexbox, while in other cases it’s not. If you are to take one...

makandra dev

Spreewald 1.1.0 drops the be_true and be_false matchers in order to be RSpec 3 and Ruby 2 compatible...

makandra dev

Macs render fonts bolder than they are, especially on dark background. This can be fixed by configuring the font smoothing...

ohshitgit.com

Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Git documentation...

A short browsing revealed that this may be a current firefox issue Current workaround: use another browser

Since Rails 5, domain models inherit from ApplicationRecord by default. This is the place to put code that should be...

jakearchibald.github.io

There are many ways to optimize SVGs. Ideally, your build pipeline does that automatically for you (e.g. via postcss-svgo...

medium.com

The article author also tested 6000+ production sites for load times. Apps became interactive in 8 seconds on desktop (using cable) and 16 seconds on mobile (Moto G4...

To check your apache2 config files for syntax errors run sudo apache2ctl configtest or shorter sudo apache2ctl -t

Usually, Cucumber feature files live in features/. When you group them in sub directories, make sure to add -r features...