set -eto terminate the script when something goes wrong.
set -xto print each command that is going to be executed with a little plus.
set -u: Treats unset variables as an error and exit immediately.
set -v: Prints shell input lines as they are read.
pgrep -x ruby > /dev/null => pgrep to see if a process is running => /dev/null: this redirects the command standard output to the null device, which is a special device which discards the information written to it if [ $? -eq 0 ]; then => this is how loops are in bash killall -9 ruby => the $? variable is "the exit code of the last command. fi
- Only rescue
- Fixing “Unresolved specs during Gem::Specification.reset:”
gem cleanup minitestor whatever it was.
- Make sure integer strings and work:
- Avoid rescue in the modifier form (
5 / 0 rescue nil), just use the block form.
pry-navis for JRuby,
pry-byebugis for MRI. They might conflict especially in 2.4.0.
default_scope: Think about this again.
rspec specbases itself on the
db/schema, not the migration.