.rb
Use cautionRuby source code
Source for Ruby, Yukihiro Matsumoto's dynamic scripting language. Rails brought it into the web-development mainstream.
MIME types
- text/x-ruby
- application/x-ruby
Category
code
What opens this file
- ruby CLI
- VS Code + Ruby LSP
- RubyMine
How to open by OS
Windows
- RubyInstaller, or WSL + rbenv.
Mac
- Homebrew, rbenv, or asdf.
Linux
- Distribution Ruby or rbenv.
Ios
- None.
Android
- rbenv via Termux.
Safety notes
eval,Kernel#load, andMarshal.loadall execute arbitrary code. Never run them on external input.- Older Rails versions carry extensive CVE history — keep majors current.
Common mistakes
- Not committing
Gemfile.lockleads to version drift across environments. - Skipping nil checks yields
NoMethodErrorfloods. Use&.and ActiveSupport'spresencewhere available.