learn-ruby-100

20.04 LTS

sudo apt-get install -y ruby ruby-dev ruby-bundler

macOS

Ventura

brew install ruby@3.1

# gem update --system --verbose -N
# gem env |grep 'EXECUTABLE DIRECTORY'

Apple silicon

fish_add_path /opt/homebrew/opt/ruby@3.1/bin
fish_add_path /opt/homebrew/lib/ruby/gems/3.1.0/bin

Intel-based

fish_add_path /usr/local/opt/ruby@3.1/bin
fish_add_path /usr/local/lib/ruby/gems/3.1.0/bin

Misc

CLI Utilities

  • Awesome Print - Pretty print your Ruby objects with style -- in full color and with proper indentation

IRB

  • Pry - A powerful alternative to the standard IRB shell for Ruby.

Money

  • Monetize - A library for converting various objects into Money objects.
  • Money - A Ruby Library for dealing with money and currency conversion.

Code Formatting

  • RuboCop - A static code analyzer, based on the community Ruby style guide.
    • Rubocop Rails - A RuboCop extension focused on enforcing Rails best practices and coding conventions.
    • Rubocop Rspec - Code style checking for RSpec files
    • Rubocop Performance - A RuboCop extension focused on code performance checks.

Ref