SammyLin / redactor-rails

This repo is deprecated. Please check out official gem for Redactor 2. https://github.com/Redactor2/redactor2_rails
MIT License
389 stars 253 forks source link

uninitialized constant RedactorRails::Document (NameError) on Heroku #47

Open rpuranik opened 11 years ago

rpuranik commented 11 years ago

Hi, here's the error I'm seeing after pushing my app to Heroku:

2013-02-12T19:29:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/redactor-rails-0.3.3/lib/redactor-rails.rb:30:in `document_model': uninitialized constant RedactorRails::Document (NameError)
2013-02-12T19:29:50+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/redactor-rails-0.3.3/app/controller/redactor_rails/documents_controller.rb:2:in `<class:DocumentsController>'
2013-02-12T19:29:50+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/redactor-rails-0.3.3/app/controller/redactor_rails/documents_controller.rb:1:in `<top (required)>'
2013-02-12T19:29:50+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-02-12T19:29:50+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:438:in `each'

I don't see this issue locally. I have tried to force Heroku to use ruby 1.9.3, but it still spits out the error from the bundle in the ruby/1.9.1 directory.

catsby commented 11 years ago

Dupe of #44

Saidbek commented 11 years ago

try to install properly rails generate redactor:install, and don't forget to migrate db on heroku, heroku run rake db:migrate

rpuranik commented 11 years ago

Nope -- even though I do both, it doesn't seem to work. I'm stuck at using redactor gem 0.3.2 to avoid this issue.

amitpatelx commented 11 years ago

I did both but it doesn't work for me as well

fauzieuy commented 11 years ago

:+1: same issue..

I'm using passenger for production

ception class: NameError

Application root: /home/admin/myappcurrent

Backtrace:

#   File    Line    Location
0   /home/admin/myapp/shared/bundle/ruby/1.9.1/bundler/gems/redactor-rails-1f63124306de/lib/redactor-rails.rb   30  in `document_model'
1   /home/admin/myapp/shared/bundle/ruby/1.9.1/bundler/gems/redactor-rails-1f63124306de/app/controller/redactor_rails/documents_controller.rb   2   in `'
2   /home/admin/myapp/shared/bundle/ruby/1.9.1/bundler/gems/redactor-rails-1f63124306de/app/controller/redactor_rails/documents_controller.rb   1   in `'```

but file redactor rails on directory assets,  uploader, and model not missing 
gaaady commented 11 years ago

happend to me as well

/app/vendor/bundle/ruby/1.9.1/gems/redactor-rails-0.3.3/lib/redactor-rails.rb:30:in `document_model': uninitialized constant RedactorRails::Document (NameError)