I trying to use carrierwave gem for upload image in Ruby on rails. following guid and try upload but, some error on my rails. i think caused database timeout, but i don't know what exactly. here's my error screen. I checked my uploader in model class and other things..
-
Which version of ruby and rails, are you using ? I never used carrierwave but I know that paperclip is now deprecated and it's better to use activestorage. You could take a look at api.rubyonrails.org/files/activestorage/README_md.html. For the database error if it is locked it's maybe because something already locked it for writing somethingSnoobie– Snoobie2020-08-31 11:23:50 +00:00Commented Aug 31, 2020 at 11:23
-
@Snoobie I using rails 6Vorasoda– Vorasoda2020-09-01 02:43:29 +00:00Commented Sep 1, 2020 at 2:43
Add a comment
|
1 Answer
SQLite3 is a file-based database, and locking is little less advanced than a full fledged DB; I would only use it in a few users setting. Maybe you have opened the DB in a SQLite viewer or another process that is locking the DB at the same time?
There are plenty of suggestions in this thread: Ruby: SQLite3::BusyException: database is locked: