Open Gedrovits opened 11 years ago
+1 Same issue on production
+1 getting the same error on heroku
+1 in combination with thin
resolved this error, used steps: https://github.com/SammyLin/redactor-rails/issues/16
@saidbek's solution did not work for me either.
Is there a solution already? I didn't understand the solution from the link of @Saidbek
+1 on what @jawks said
hi guys, this is really strange. Me also was getting the same error (uninitialized constant RedactorRails::Document) while installing this gem on heroku, and then found that link, did the same steps, deployed to heroku and it started working as it should. But today i just created test app and did the pretty straightforward installation. I've push it to the heroku, you can view it here: http://immense-brushlands-1998.herokuapp.com/products/new
@saidbek do you mind publishing that app on github so we can see the exact code you used? sometimes we set things up a bit differently and it would help to see all the configuration you do and try it on our own apps. thanks.
@jiangkeren yes sure, here's a repo: https://github.com/Saidbek/test-redactor
I had the same error in my production environment (using Passenger) and it turns out I was missing app/models/redactor_rails/document.rb and app/uploaders/redactor_rails_document_uploader.rb. I fixed it by running rails generate redactor:install
on a new rails app and copying those two files into my existing app.
Thanks @adelang -- that was the correct solution!
Thanks @adelang , But I think, it's not the right solution for the future, should i do every deploy?
I hope this problem will be fixed soon.
Hey. Recently gem was updated and if you try to start Unicorn server it fails, because can't find document model.