💎 Ruby / Rails errors

Ruby and Ruby on Rails errors — NoMethodError, ActiveRecord, migrations, routing and authenticity tokens.

CodeErrorWhat it means
ActionController::InvalidAuthenticityToken Rails: ActionController::InvalidAuthenticityToken (Can't verify CSRF token authenticity) A non-GET request arrived without a valid CSRF token for the session.
ActiveRecord::PendingMigrationError Rails: ActiveRecord::PendingMigrationError — Migrations are pending. To resolve this issue, run: bin/rails db:migrate The database schema is behind the migration files in the app.
undefined method for nil Ruby: NoMethodError: undefined method `x' for nil (nil:NilClass) You called a method on nil — the object you expected (a record, hash value, param) wasn’t there.