debug

(★ 1,271)

Debugging functionality for Ruby

File Explorer

  • .gitignore
  • CONTRIBUTING.md
  • debug.gemspec
  • Gemfile
  • LICENSE.txt
  • Rakefile
  • README.md
  • TODO.md

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

line

View Details ▼

Manage lines.
Accessed in configuration mode.

line vty 0 15

Configure lines from 0 to 15:

line

Read input:

🔍

bundle

View Details ▼

Dependency manager for the Ruby programming language.

bundle install

Install all gems defined in the `Gemfile` expected in the working directory:

bundle exec {{command}} {{arguments}}

Execute a command in the context of the current bundle:

bundle update

Update all gems by the rules defined in the `Gemfile` and regenerate `Gemfile.lock`:

🔍

edit

View Details ▼

A terminal-based text editor from Microsoft.

edit {{path/to/file}}

Open a file:

tldr run-mailcap

View documentation for the original command:

<Ctrl f>{{pattern}}<Enter>

Search for a pattern:

🔍

eval

View Details ▼

Execute arguments as a single command in the current shell and return its result.

eval "{{echo foo}}"

Call `echo` with the "foo" argument:

eval "{{foo=bar}}"

Set a variable in the current shell:

🔍

expr

View Details ▼

Evaluate expressions and manipulate strings.

expr length "{{string}}"

Get the length of a specific string:

expr substr "{{string}}" {{from}} {{length}}

Get the substring of a string with a specific length:

expr match "{{string}}" '{{pattern}}'

Match a specific substring against an anchored pattern:

🔍

gem

View Details ▼

A package manager for the Ruby programming language.

gem search {{regex}} {{[-a|--all]}}

Search for remote gem(s) and show all available versions:

gem install {{gem_name}}

Install the latest version of a gem:

gem install {{gem_name}} {{[-v|--version]}} {{1.0.0}}

Install a specific version of a gem:

🔍

host

View Details ▼

Lookup Domain Name Server.
See also: `dig`, `resolvectl`, `nslookup`.

host {{domain}}

Lookup A, AAAA, and MX records of a domain:

host -t {{field}} {{domain}}

Lookup a field (CNAME, TXT, ...) of a domain:

host {{ip_address}}

Reverse lookup an IP:

🔍

irb

View Details ▼

Interactive Ruby shell.

irb

Start the interactive shell:

irb --simple-prompt

Start the interactive shell with the simple prompt:

irb -f

Start the interactive shell without reading the configuration file:

🔍

next

View Details ▼

React framework that uses server-side rendering for building optimized web applications.

next dev

Start the current application in development mode:

next dev {{[-p|--port]}} {{port}}

Start the current application and listen on a specific port:

next build

Build the current application optimized for production:

🔍

rails

View Details ▼

A server-side MVC framework written in Ruby.
Some subcommands such as `generate` have their own usage documentation.

rails new "{{project_name}}"

Create a new rails project:

rails generate scaffold Post title:string body:text

Generate a scaffold for a model named Post, predefining the attributes title and body:

rails db:migrate

Run migrations:

🔍

rake

View Details ▼

A Make-like program for Ruby.
Tasks for `rake` are specified in a Rakefile.

rake

Run the `default` Rakefile task:

rake {{task}}

Run a specific task:

rake --jobs {{n}}

Execute `n` jobs at a time in parallel (number of CPU cores + 4 by default):

🔍

rspec

View Details ▼

Behavior-driven development testing framework written in Ruby to test Ruby code.

rspec --init

Initialize an `.rspec` configuration and a spec helper file:

rspec

Run all tests:

rspec {{path/to/directory}}

Run a specific directory of tests:

🔍

ruby

View Details ▼

Ruby programming language interpreter.
See also: `gem`, `bundler`, `rake`, `irb`, `ri`.

ruby {{path/to/script.rb}}

Execute a Ruby script:

ruby -e "{{command}}"

Execute a single Ruby command in the command-line:

ruby -c {{path/to/script.rb}}

Check for syntax errors on a given Ruby script:

🔍

watch

View Details ▼

Execute a program periodically and monitor the output in full-screen mode.

watch {{command}}

Repeatedly run a command and show the result:

watch {{[-n|--interval]}} 60 {{command}}

Re-run a command every 60 seconds:

watch {{[-d|--differences]}} df

Monitor disk space, highlighting differences as they appear:

// repository documentation