If you show examples of your Profile and .env it would be be easier for someone to help out.
My wild guess from your question is you are using the env variables incorrectly in the Procfile.
If for example in .env you have PORT=3000
then in your Profile it's referred to as $PORT -- not as ENV['PORT']
In a ruby file such as a config initializer you WOULD use ENV['FOO']