Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
No Such File or Directory #15
Noob having a hell of a time here, any help would be greatly appreciated....
i have some code like this at the moment...
( where the s3 url is being populated by song.file_url.to_s and is completely a real file that exists on s3. )
No matter what I seem to do I am getting:
"No such file or directory -https://mySite.s3.amazonaws.com/uploads/comment/file/87/song.mp3"
I read somewhere that you have to use .path but that only returns a local path and won't work for S3. Then I saw there was a pull request to use stringIO for scenarios like these so I tried:
<% myFile = StringIO.open("https://mySite.s3.amazonaws.com/uploads/comment/file/87/song.mp3") %>
And get the following error:
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Thanks moumar. That did in fact work! Thanks for taking the time to respond. I thought I tried that before but must've been missing something else when I tried that. I was able to get the duration, but unfortunately it takes a quite a long time because I have to load the whole file first. Thats what led me down the path of stringio. According to the folks in this post it should help avoid having to download the whole file.
...which in turn led me here, looks like you had merged the support in at some point...