Add support for different environment arguments than RAILS_ENV

This change makes it possible to use whenever in non-rails apps, where a different environment argument than RAILS_ENV is used.