0
votes

I've deployed my Rails application to Heroku following https://devcenter.heroku.com/articles/rails3 and can open a website like http://severe-mountain-793.herokuapp.com

In my controller, I have a system command that downloads a file into the public directory with system('wget', ..., Rails.root.join('public/...')). Apparently, from checking the exit status of the command, I realize that the command fails. But I don't know why it fails, and I don't know how to show the output message of the command. What can I do?

1

1 Answers

1
votes

I think heroku's filesystem is read-only, so you can't really save files using wget, except if you want to save them inside the '/tmp' folder, where they could be deleted anytime. Moreover, dynos have a 30 seconds timeout, so this would fail for every download which takes more than that interval.