I am trying to open a CSV File stored in an AWS S3 using Rails Active Storage but am getting the below error message. I am able to upload and download files without issues but seems to be an issue with the code.
Error:
No such file or directory @ rb_sysopen
- then it has the AWS URL - if this is copied and then pasted in the browser, I am able to download the file.
Code:
url = @item.csv.urlcsv_file = File.open(url)@data = SmarterCSV.process( csv_file)
The following are at the top of my controller as well
require 'open-uri'require 'csv'