Let's say you have a gem which has the following module: # within the imaginary super gem module SuperClient
We want to keep a changelog for all gems we maintain. There are some good practices for writing a changelog...
Create a user without password (recommended) Replace newuser with your desired username: mysql -uroot -p CREATE USER 'newuser'@'localhost' IDENTIFIED...
Lets say we have a user with a contract whereas contract is a mounted carrierwave file. Now we want to...
We often use the Then console step from spreewald in combination with geordi vnc from geordi to debug tests within...
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'. Gem Load Error is: Incorrect MySQL client...
Trying to open a vnc window with geordi geordi vnc ended up with this error: > VNC viewer could not be...
mysql> SELECT @@global.version; +------------------+ | @@global.version | +------------------+ | 5.6.30 | +------------------+ 1 row in set (0,00 sec) MySQL 5.6 Reference Manual says "BLOB and TEXT...
Use bundler > 1.15 to fix Gem::LOADED_SPECS_MUTEX (NameError). Given the following project: ruby -v ruby 1.8.7
Enumerable#all? returns true for an empty collection. This totally makes sense but you have to think about it when...
This cucumber step is useful for testing an image (looking at the src of the image). Then(/^I should see...
This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...
To check which elements an ActiveRecord relation contains use the contain_exactly matcher. describe User do let!(:admin) { create(:user...
This is a small example on how you can check if your Postgres index can be used by a specific...
To find and replace (CTRL + H) empty cells in Libre Office Calc you can use a regular expressions (also called...
You are not using javascript tests The file is served from a public folder (not via controller) Problem description...
Download the dictionary from http://www.winedt.org/dict.html, e.g. http://www.winedt.org/dict/de_neu.zip unzip de_neu.zip mkdir ~/Documents/dic iconv -f UTF-16 -t...
Let's say you have a folder images and want to to move all files in there to a new...
You need to set the :inverse_of option manually for relations that have an association to a polymorphic model. Otherwise...
If another session is accessing your database you are trying to reset or drop you might have seen the following...
Use return to return from a method. return accepts a value that will be the return value of the...
before(:all) runs the block once before all of the examples. before(:each) runs the block once before each...
There are many approaches out there how you can import data from a legacy application to a new application. Here...
You can not use the hash_including argument matcher with a nested hash: describe 'user' do let(:user) { {id: 1...