Closed roomaroom closed 2 years ago
Can you load any other dependency?
(For example open up a rails console on your production environment and use a module or class that should have been defined by a dependency)
I have this issue before, what I'm doing to fix this is,
remove mount PdfjsViewer::Rails::Engine => "/pdfjs", as: 'pdfjs'
from routes.rb
and gem 'pdfjs_viewer-rails' from Gemfile
then bundle
after that
I put the gem 'pdfjs_viewer-rails'
to the Gemfile and bundle install
then make sure the pdfjs_viewer-rails is loaded
then I put this mount PdfjsViewer::Rails::Engine => "/pdfjs", as: 'pdfjs'
to my routes.rb
now its work
@roomaroom are you using Spring? Maybe spring cached a corrupt state. 😐
I've just run the project now on Rails 7 and it's working as expected. This issue is 5 years old, Im guessing it is no longer relevant.
Recommend close.
@evolve2k Thanks for your feedback. I'm closing the issue. If the problem comes up again, we can reopen.
In production mode I got this error
config/routes.rb:17:in block in <top (required)> : uninitialized constant PdfjsViewer (NameError)
My routes.rbmount PdfjsViewer::Rails::Engine => "/pdfjs", as: 'pdfjs'
In development mode everything is ok