In medium-sized to large Rails applications, asset compilation can take several minutes. In order to speed up deployment, asset...
If you use the Better Errors gem, you will sometimes notice that it can be very slow. This is because it sometimes renders a huge amount of data that will...
You can significantly improve performance by adding this to config/initializers/better_errors: if defined?(BetterErrors) && Rails.env.development? module BetterErrorsHugeInspectWarning def inspect_value(obj) inspected = obj.inspect if inspected.size > 20_000 inspected = "Object...
RSpec let's you chain a matcher with .or. The expectation will then pass if at least one matcher matches...
If you're using jQuery, you need to update to 1.5.1 to get Internet Explorer 9 to work.
...updated with newly discovered issues and remove old issues as they're fixed or become obsolete. If you discover a bug that's not listed here, please report it so...
...everyone else can benefit...
Nested exceptions for Ruby: When you rescue an error and then re-raise your own, you don't have to...
The ancestry gem allows you to easily use tree structures in your Rails application. There is one somewhat unobvious pitfall...
Webpacker can automatically create an icon font from SVG files, which is really handy. When you're using the asset...
When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error...
If you want to get a deep understanding of how closures, blocks, procs & lambdas in Ruby work, check out the...
Use protocol independent URLs whenever possible so that the browser will choose the protocol related to the protocol which the...
...this global option, and use the :visible option when calling page.find(...). This way the behavior is only changed for this one find and your step doesn't have confusing side...
Capybara has an option (Capybara.ignore_hidden_elements) to configure the default query behavior of finding nodes within the DOM. It's default value is false. That means that...
Don't insert table rows in a Rails database migration. This will break tests that expect that database to be...
...directory like ~/bin/rubymine, and update that link whenever you update RubyMine. This has many benefits: A launcher pointing to ~/bin/rubymine/bin/rubymine.sh runs the recent version. No need to touch it.
From Ubuntu 17, rbenv fails to install Ruby below 2.4 because of a mismatching OpenSSL dependency: it needs libssl1.0-dev for...
Next time you have to do more than trivial CSS changes on a project, you probably want to have live...
...complain about calling nil.name or nil.macro while it tries to process the association list. Best practice Make sure to do it this way: params.to_hash.symbolize_keys.merge(:include => { :user => :avatar }) (Note that params.to...
User Stories should describe what a user wants the system to do. Purely technical tasks should usually be implemented as...
Saying git diff only shows unstaged changes relative to the index (or HEAD if the index is empty, alternatively any...
How do HTTP requests and responses look like? What are HTTP headers? What are they used for?
...layout since such things are part of your application's logic -- and thus they belong into the corresponding model. How to Do it like this: In your migration, after adding...
...edit string fields, you probably want to strip the entered values (remove whitespace from beginning and end). The reason is that your users will copy + paste values from unholy places...
XPath matchers can be combined with CSS-selector matchers. This is really useful if not, for example, the content of...
For websites that don't do JavaScript rendering on the client, it's best practice to put script tags at the bottom of the HTML. This way, the page can...