Ruby
- is a dynamic, reflective, object-oriented, general-purpose programming language
- it was designed and developed in the mid-1990s by Yukihiro “Matz” Matsumoto in Japan
IDE
- RubyMine - https://www.jetbrains.com/ruby/
Installation
homebrew
Search ruby versions via home-brew
brew search rubyInstall ruby using home-brew
brew install <ruby version here>This would download into
/usr/local/CellardirectoryVerify ruby
which <ruby version here> <ruby version here> -v
Command
open ruby console
Open ruby console
irb
Package Manager
gem
gem
ERB
Click here to expand...
.erb files are Embedded RuBy files
Installation
homebrew
Mac already has the erb command
Example Use
Click here to expand...
erb example.txt.erb > result.txtexample.txt.erb contents below
Hello, <%= @name %>. Today is <%= Time.now.strftime('%A') %>.Running ERB from the Command-line
Subpages
Projects
- master example - https://github.com/TheRealMarcusChiu/RubyMasterExample.git