Fixed: undefined method environment for nil:NilClass