RubyGems Navigation menu

environment_information 1.0.120

This small class will store (and if requested, also output) Environment information, such as the GCC Version in use, the Kernel, which Ruby Version is used, what the Host CPU Model is (on Linux), GTK and GLIB version, and so forth. Sometimes it will try to query pkg-config .pc files, sometimes it will try to infer the version from the .so file, and sometimes it will try to run the system command with a -V or -v flag. It will store all of this information in the instance_variable @string, which can be accessed through a reader-method such as .main_string? .string? or .string (all are equivalent there) and used in other scripts. You can also display some additional information, such as GTK, Glib, Atk and Pango Versions, by passing in "f" or "full" on the commandline. See the help section of this script, which you can invoke by passing "help" or "--help" as argument to it. Since May 2013 we will try to feedback the CPU Module in use. An openssl-flag was added as of Nov 2013. We now have a dependency on the Colours module, as of Nov 2013. Colours should be optional though. Version 1.0.15 added option to display the make version in use. Version 1.0.17 added optional Cairo display when showcasing ALL. Version 1.0.20 made asciitable optional. The latest version at October the 17th, 2015, added support for querying diffutils version, makeinfo and XZ Utils. There are essentially two basic and recommended ways how to use this class: (1) From the commandline, just call it directly and pass it specific commands (optionally). For instance, invoke the script with the argument "ALL" and we will show all information. This is personally my favourite way how to invoke this class. (2) Embedded somewhere else, i.e. for use in a .cgi page. An example for the latter follows: _ = _.set_n_tokens 58 _.disable_colours _.be_silent _.dont_show_ruby_stuff Do note that this also works: EnvironmentInformation[] The "binary" is called envi. So you can invoke the script by typing envi from the commandline. The latest release in October 2015 can also make use of Cookbooks, and then tell us whether we have outdated programs. The usage is as follows: envi ALL REALLY_ALL Since this is hard to type, I suggest to alias it. See the menu.rb file for more aliases to that. If you have specific suggestions to make this gem more useful for others, please drop me an email at: Thank you.


  1. 1.0.120 - August 11, 2016 (25.5 KB)
  2. 1.0.119 - July 27, 2016 (25.5 KB)
  3. 1.0.118 - July 19, 2016 (25 KB)
  4. 1.0.117 - July 18, 2016 (25 KB)
  5. 1.0.116 - July 17, 2016 (25 KB)
Show all versions (114 total)


  • Robert A. Heiler



SHA 256 checksum:


Total downloads 51,370

For this version 161

= Copy to clipboard Copied!




Required Ruby Version: >= 2.3.1

Required Rubygems Version: >= 2.6.6