Fixed undefined method `environment' for nil:NilClass bug,

See http://stackoverflow.com/questions/22392862/undefined-method-environment-for-nilnilclass-when-importing-bootstrap