-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carrierwave 500s with "TypeError (no implicit conversion of nil into String)" when not on Heroku #43
Comments
What server are you using? I would assume that the tmp directory would be writable otherwise (Heroku is sortof read-only). |
I'm on a digitalocean VPS for this installation, nginx + unicorn. The problem doesn't appear to be one of whether the temp directory is writeable, but rather one of the call to Would it be more appropriate to delegate to some other default in the non-Heroku case? I looked back at the history of the file and couldn't infer what the intent was when I tracked down the problem. |
I am seeing this problem problem when uploading on a private server as well as localhost.
|
And it works when setting the tmp dir? I'm a bit confused with the error message if the problem is not being able to store to disk. |
I am not sure that that is the problem, the error message is pretty vague. I am using s3 and not heroku, so maybe the cache_dir thing is the problem, maybe not. Is there anything you want me to experiment with to help debug? |
A full stack trace would help. Try changing this and see if that helps. https://github.com/rick/balder/commit/81af9e7eedef9cf5a1d676213f888d6cfee40fa7 |
Not necessary. I just commented out the cache_dir method and it worked. So the problem is that you are returning false from the cache_dir method in file_uploader.rb when not using heroku instead of calling super or the default it expects (I think). |
Hm, spoke too soon. Worked locally, but not on the remote server. |
Sorry for the smap, twas a caching issue. This fix works for me both locally and on my remote non-heroku server with s3 |
I have a patch for this over in https://github.com/rick/balder/pull/1, specifically https://github.com/rick/balder/commit/81af9e7eedef9cf5a1d676213f888d6cfee40fa7
but I'm not clear on what the various concerns are (and whether this will break something for other folks).
I was seeing these sort of errors consistently:
The
cache_dir
method, which carrierwave seems to rely on, is only defined on Heroku + S3 configurations. It might actually need to be widened to be defined on all configurations, but I'm at least relying on S3 myself, so not sure.The text was updated successfully, but these errors were encountered: