Setting Up Your Development Environment
Prerequisites: Installing Ruby
Any text editor can edit Ruby, but one that understands Ruby catches mistakes as you type:
- Visual Studio Code with the Ruby LSP extension (by Shopify) — free and cross-platform. It adds autocomplete, inline errors, formatting, and "go to definition".
- RubyMine by JetBrains — a full commercial IDE for Ruby and Rails.
You also get two tools with Ruby itself:
irb(Interactive Ruby) — typeirbin a terminal, and you can run Ruby one line at a time and see each result immediately. It's the fastest way to experiment. Typeexitto leave.ruby— runs a whole file:ruby hello.rb.
$ irb
irb(main):001> 2 + 3
=> 5
irb(main):002> "ruby".upcase
=> "RUBY"
irb(main):003> exit
The => line is the value of the expression you typed. Keep an irb
session open while you work through these lessons and try every
example in it.