Monthly Archives

October 2019

Ruby. Configuration information

By Posts No Comments

Basic formula: RbConfig:: CONFIG[“term”].
Below outlines the terms and the directories they refer to.

 

TermDirectory contents
rubylibdirRuby standard library
bindirRuby command-line tools
archdirArchitecture-specific extensions and libraries (compiled, binary files)
sitedirYour own or third-party extensions and libraries (written in Ruby)
vendordirThird-party extensions and libraries (written in Ruby)
sitelibdirYour own Ruby language extensions (written in Ruby)
sitearchdirYour own Ruby language extensions (written in C)

 

Exaple

$ irb --simple-prompt -r rbconfig
>> RbConfig::CONFIG["bindir"]