I came across this post because I had the same error you described, but restarting the server didn't resolve it (as suggested by other answers). In my case, the problem was caused because I used mount_uploaderbeforeattr_accessible. By switching them I solved the problem.