Posts [ 11 ]

Topic: Paperclip not saving any images

Hey everyone,

I was hoping this would've been a 5 minute task, but again, my database is not getting the values, this time from paperclip.

I tried this on a test app on my Mac, and it works fine. Go figure! The only difference is on My Mac I'm just using Mongrel, and SQLite for my DB. The main app I have on Ubuntu LTS 8.04 LTS, running on Apache2, mod_rails 2.2.5, with MySQL 5 for my DB.

I got Paperclip installed, generated the paperclip, and called it avatar, of which it associates to the User model.

Re: Paperclip not saving any images

Ok, created the db to mysql. Worked fine after that. Even after setting up a VirtualHost for apache, and using Passenger, it worked fine.

Furthermore, with the problematic app, I changed the db to a local mysql instance, I also used mongrel again, I even then changed the db to a local sqlite3 db. In every scenario the same thing still happens.

Yet, in every other application I write it works fine using both Mongrel and Passenger, using mysql or sqlite3.

Re: Paperclip not saving any images

I found this thread useful, had made the same mistake. Thanks for the answer! I agree that it is strange how erratically paperclip behaves here. You had inconsistencies based on the server, and I made one model without the attr_accessor that worked fine, then tried to use the same code for my user model and was really confused when it didn't work.