Getting information about the current Ruby environment can be a bit arcane. Lots of solutions exist in the form of various globals, things like Config::CONFIG, and various other oddities. This gem tries to bring it all together and make it sane.
Gemfile gem 'runtime_info', '~> 0.0.0'
install gem install runtime_info