@podcast.audio.service_url instead of url_for(@podcast.audio) which will be a direct link to the S3 endpoint. However, if you're using a different storage mechanism like disk in your development environment, it wouldn't work. You may need to have minio or something similar within your development environment.