identifier method returns nil #822

HuckyDucky opened this Issue Aug 24, 2012 · 7 comments


None yet
6 participants

I'm using v0.6.2 to persist uploaded files to S3. The files are getting up there fine. My object is Catalog, and the uploader is for a string field called "asset".

I can call:

c = Catalog.first

yet the following call returns nil:


The only way I can get the identifier is if I call:


The file is definitely there in S3, and I can view it.

Have the same problem using last version and using file storage. My auploader is named file_uploader and I have also redefined the store dir as

def store_dir
if ! then forum="Forum_#{}" else forum='Forum_???' end
if model.kind.include?('user') then kind='user_files' else kind='forum_files' end

I have the same issue with file storage. The db column is named "file" but I have also other models with different column names with the same issue.

Marmolin commented Sep 8, 2012

I think it is a namespace problem. I think the name identifier also is used in another context i carrierwave. I solved the problem by adding the following method to my uploader FileUploader,
The attribute file seems to work in any uploader so that attribute must be an attribute that carrier adds. I was just lucky to use the same name in my carrier column

def identifier!

Hope this solve the problem for you too

benben commented Oct 3, 2012

I can confirm this error in carrierwave (0.6.2). Would love to see this fixed! Thanks! ❤️ ❤️ ❤️

pjammer commented Nov 16, 2012

Same here. Thought it was me... for the nine millionth time. good to see a weird error has friends at least, this time.

== EDIT ===
I think i have something. going to do a pull request. It fixes the problem at least.

pjammer commented Nov 18, 2012

Ok have a pull request. Maybe one or two of you guys in this issue thread could try it out to see if it fixes your situation too? Works in mine and all tests pass in the rubies.


bensie commented Nov 28, 2012

Closing in favor of #900. Please try out that fix and report back. Thanks!

@bensie bensie closed this Nov 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment