RbConfig
Presents the configuration1 for the current Ruby installation.
irb --simple-prompt -r -rbconfig
Requires the rbconfig
module in an irb
session
RbConfig::CONFIG['bindir']
=> "/home/vadim/.asdf/installs/ruby/3.0.0/bin"
Other useful keys in the CONFIG
hash:
rubylibdir
- Ruby standard librarybindir
- Ruby command-line toolsarchdir
- Architecture specific extensions and libraries (compiled, binary files)sitedir
- Your own or third-party extensions and libraries (written in Ruby)vendordir
- Third party extensions and libraries (written in Ruby)sitelibdir
- Your own Ruby language extensions (written in Ruby)sitearchdir
- Your own Ruby language extensions (written in C)