| Capybara call | How it finds the radio |
|---|---|
choose('smoker_s') |
by the radio button’s id |
choose('Sim') |
by the label’s visible text |
| Command | Action | When to Use |
|---|---|---|
rails db:reset |
Rebuild DB using schema.rb | Faster, recommended for development |
rails db:setup |
Create DB, load schema, seed | When setting up a new project |
rails db:drop db:create db:migrate |
Rebuild DB running migrations | When testing migrations |
| Node | Meaning | Example |
|---|---|---|
sbegin |
sequence of expressions | top-level script |
lvasgn |
local variable assignment | name = ... |
str |
simple string | "Gilberto" |
dstr |
dynamic string (with interpolation) | "Hello, #{name}" |
send |
method call | puts ... |
| Type | When It Runs | Example Tools | What It Detects |
|---|---|---|---|
| Static Analysis | Before execution | RuboCop (Ruby), ESLint (JS), pylint (Python) | Style issues, unused variables, bad practices, security smells |
| Dynamic Analysis | While the program runs | RSpec, pytest, valgrind | Runtime errors, memory leaks, logic bugs |
| Connect To | Type | Use Case | Rails-compatible |
|---|---|---|---|
XE |
Container (CDB$ROOT) | Admin / system-level | ❌ |
XEPDB1 |
Pluggable Database (PDB) | App data, user schemas | ✅ |
| File | Description | Direct label on page |
|---|---|---|
| instantclient-basic-linux.x64-21.13.zip | Runtime libraries (required) | “Basic Package (ZIP)” |
| instantclient-sdk-linux.x64-21.13.zip | Header files for compiling ruby-oci8 |
“SDK Package (ZIP)” |
| instantclient-sqlplus-linux.x64-21.13.zip | SQL*Plus CLI for testing | “SQL*Plus Package (ZIP)” |
Rails + Tmux + Vim Quick Commands
| Sym | Command | Description |
|---|---|---|
| 🆕 | tmux new -t rails |
Create and attach a new tmux session named rails |
| ⬆️ | vim Gemfile |
Open the Gemfile using Vim |
| ⬇️ | :tabe spec/rails_helper.rb |
Open Rails configuration file in a new Vim tab |
| ⬇️ | :tabe spec/rspec_helper.rb |
Open RSpec configuration file in a new Vim tab |
| ⌨️ | gt |
Switch between open Vim tabs |
| ⌨️ | Ctrl + b, then Ctrl + Shift + % |
Split tmux window into right panel (side-by-side) |
| ⌨️ | Ctrl + b → → |
Move focus to the **rig |
| Concept | Meaning |
|---|---|
| Chained method | A sub-method added to a custom matcher with chain |
| Purpose | Extend matcher behavior with extra options or context |
| Example | expect(user).to have_error_message("can't be blank").on_field(:name) |
| Config effect | include_chain_clauses_in_custom_matcher_descriptions = true makes RSpec include .on_field(:name) in failure messages |
NewerOlder