How to fix: VirtualBox Guest Additions setup is out of date
When you are trying to install/update VirtualBox Guest Additions on your guest machine but the setup is for a different/older version (for example 4.0.4 tools for a 4.1.x VirtualBox installation), try this:
sudo apt-get install virtualbox-guest-additions-iso
For some reason, this is no dependency to VirtualBox itself -- and if you have an old ISO lying around, VirtualBox will just pick that one, regardless of its version.
Oh joy.
Related cards:
How to fix: Unable to read files from a VirtualBox shared host folder
When you want to copy/move from a shared folder (on Windows guests, for example) and it fails with absurd error messages (lots of text or an error about the target being read-only), you are probably running on Guest Additions that no longer match ...
Customize tokenization of the MySQL FULLTEXT parser
The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it splits a word at period characters.
Since the tokenizer has near-zero configuration options (minimum word length and stopwords list), you n...
When sessions, cookies and Clearance tokens expire and how to change it
Expiration of Rails sessions
By default Rails sessions expire when the user closes her browser window.
To change this edit your config/initializers/session_store.rb
like this:
ActionController::Base.session = ...
How to create giant memory leaks in AngularJS (and other client-side JavaScript)
This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process crashes on your users.
Although this guide has been written for Angular 1 originally, most of the advice is relevant...
How to make Rational#to_s return strings without denominator 1 again
The way Rational#to_s
works on Ruby has changed from Ruby 1.9 on. Here is how to get the old behavior back.
You may want this for things where Rationals are being used, like when subtracting Date
objects from one another.
What's happening?...
Capistrano: How to find out which version of your application is currently live
When deploying, Capistrano puts a REVISION
file into your application's release directory. It contains the hash of the commit which was deployed.
If you want to know the currently deployed release, simply SSH to a server and view that file.
``...
How to fix "Too many authentic authentication failures" with SSH and/or Capistrano
You are getting when connecting via SSH or deploying with Capistrano (which uses SSH):
Too many authentication failures for username
This is caused by having too many SSH keys added to your keyring or ssh-agent. Your ssh-agent will throw all...
How to: Upgrade CarrierWave to 3.x
While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic changes you need to perform and some behavior you may eventually run into when upgrading your application. This aims to save you some...
How to find out which type of Spec you are
When you need to find out in which kind of spec you are during run-time, it's definitely possible. It's a lot easier in RSpec 2+.
For example, consider this global before
block where you'd want to run some code for specific specs only:
c...
Fixing flaky E2E tests
An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium WebDriver. This card shows basic techniques for fixing a flaky E2E test suite that sometimes passes and sometimes fails.
Although many examples ...