To avoid issues in development with Foreman I need to I need to wrap the Puma server in a Socks proxy for Quotaguard to get a static IP in production and production only.
Using a link to this article that I found from this question I implemented the following code in bin/web call from Procfile.
#!/bin/sh
if [ "$RACK_ENV" == "production" ]; then
echo Using qgsocksify to wrap Puma
bin/qgsocksify bundle exec puma -C config/puma.rb
else
echo Using straight Puma
bundle exec puma -C config/puma.rb
fi
Although the environment is production set on RACK_ENV the unwrapped "straight Puma" server launches. Testing this locally works but it fails on Heroku.
What's the syntax error that would cause it to fail on Heroku?