Like idlefingers pointed out, for newer versions of rails, Rails.application.config.my_variable
should get you what you're looking for.
However, if that doesn't work because you're stuck with an older version of Rails (2.3, etc) you can use the ENV
constant, like so: ENV['my_variable']