I implemented a simple pixel tracker for emails. When calling my controller method I use send_file
to respond with a gif image in an html email template.
send_file 'https://s3.eu-central-1.amazonaws.com/xxxxxxxxxxx.gif', :type => 'image/gif', :disposition => 'inline'
Now everytime the image is loaded I get
An ActionController::MissingFile occurred in emails#mail_check:
Cannot read file https://s3.eu-central-1.amazonaws.com/eventbaxx/xxxxxxxxxxx.gif app/controllers/emails_controller.rb:90:in `mail_check'
I realize that it might have to do with access rights but I set the file to public and I can also access the image via my browser so that should not be the problem.
My app is hosted on heroku.
What do I do wrong?