refinerycms icon indicating copy to clipboard operation
refinerycms copied to clipboard

Problems with install in Rails 6 - wrong constant name Refinerycms-pages

Open ebed opened this issue 6 years ago • 3 comments

After create a docker machine with the reciple for ruby and refinery edge, is throwing me this error.. any clue about what I'm doing bad? Thanks

cptz-blog_1 | /usr/local/bundle/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:497:in `rescue in block in set_autoloads_in_dir': wrong constant name Refinerycms-pages inferred by Module from file (Zeitwerk::NameError) cptz-blog_1 | cptz-blog_1 | /usr/local/bundle/bundler/gems/refinerycms-53ea228ba053/pages/lib/refinerycms-pages.rb cptz-blog_1 | cptz-blog_1 | Possible ways to address this: cptz-blog_1 | cptz-blog_1 | * Tell Zeitwerk to ignore this particular file. cptz-blog_1 | * Tell Zeitwerk to ignore one of its parent directories. cptz-blog_1 | * Rename the file to comply with the naming conventions. cptz-blog_1 | * Modify the inflector to handle this case.

ebed avatar Jan 27 '20 15:01 ebed

Hi @ebed !

We are trying to fix this bug, there is a WIP pull request #3465 (Don't use it for now!)

In waiting for the bugfix, you should disable zeitwerk from your Rails application by adding config.autoloader = :classic in config/application.rb :

https://github.com/refinery/refinerycms/blob/db64c6cc36fa52c59f0c6e0ce012ef672196be93/core/lib/generators/refinery/dummy/templates/rails/application.rb.erb#L14

bricesanchez avatar Jan 27 '20 15:01 bricesanchez

Same issue with our app for

refinerycms-db8bb6be6f40/pages/lib/refinerycms-pages.rb

thebravoman avatar Apr 22 '20 20:04 thebravoman

Hi @ebed !

We are trying to fix this bug, there is a WIP pull request #3465 (Don't use it for now!)

In waiting for the bugfix, you should disable zeitwerk from your Rails application by adding config.autoloader = :classic in config/application.rb :

https://github.com/refinery/refinerycms/blob/db64c6cc36fa52c59f0c6e0ce012ef672196be93/core/lib/generators/refinery/dummy/templates/rails/application.rb.erb#L14

This worked for me. Thank you.

thubamamba avatar Feb 02 '21 13:02 thubamamba