Chris Jones 59ff335729 [ruby] add note about using `bundle` to add a gem to a `Gemfile` via a cli 4 anni fa
..
README.md 59ff335729 [ruby] add note about using `bundle` to add a gem to a `Gemfile` via a cli 4 anni fa
gemrc f37ef07d29 setup a template `gemrc` for managing rubygems on a box 6 anni fa
irbrc 7dd1e0f6fc [wiki] updates 5 anni fa

README.md

Ruby Tooling

Contents

Ruby 🔝

Notes regarding the Ruby programming language

To lint, ie. check a ruby source file for syntax errors

ruby -c /path/to/mr-fancy-42.rb

Working with system / shell commands in ruby files 🔝

To execute a shell command within a Ruby source file

`echo 'hello from shell`

An alternative to the above syntax is to use system instead of a pair of back ticks, ie. ``

system "echo 'hello from shell'"

I had better results using back ticks as opposed to using system for storing information into and out of variables.

working with bundler

To install a specific gem for a specific bundle, ie. insert a gem into the local Gemfile with the version specified

bundle add [gem]

open the the Gemfile and move to appropriate group if needed