You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I changed the name of a controller from "ReadOnlyDashboardController" to "ReadOnlyDashboardsController". This appears to have broken administrate's generator function, as I keep seeing this error when I run "rails g administrate:install"
/Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/administrate-0.19.0/lib/generators/administrate/dashboard/dashboard_generator.rb:140:in `klass': uninitialized constant ReadOnlyDashboard (NameError)
@klass ||= Object.const_get(class_name)
^^^^^^^^^^
Did you mean? ReadOnlyDashboardHelper
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/administrate-0.19.0/lib/generators/administrate/dashboard/dashboard_generator.rb:62:in `attributes'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/administrate-0.19.0/lib/generators/administrate/dashboard/templates/dashboard.rb.erb:11:in `template'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/3.2.0/erb.rb:429:in `eval'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/3.2.0/erb.rb:429:in `result'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/file_manipulation.rb:131:in `block in template'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/create_file.rb:53:in `render'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/create_file.rb:63:in `block (2 levels) in invoke!'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/create_file.rb:63:in `open'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/create_file.rb:63:in `block in invoke!'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/empty_directory.rb:117:in `invoke_with_conflict_check'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/create_file.rb:60:in `invoke!'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions.rb:93:in `action'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/create_file.rb:25:in `create_file'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/actions/file_manipulation.rb:122:in `template'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4.3/lib/rails/generators/named_base.rb:25:in `block in template'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4.3/lib/rails/generators/named_base.rb:45:in `inside_template'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.4.3/lib/rails/generators/named_base.rb:24:in `template'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/administrate-0.19.0/lib/generators/administrate/dashboard/dashboard_generator.rb:40:in `create_dashboard_definition'
If I try to run it again, I get a different error:
/Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/callbacks.rb:25:in `on_file_autoloaded': expected file /Users/youngcha/reykitestapp/app/dashboards/read_only_dashboard_dashboard.rb to define constant ReadOnlyDashboardDashboard, but didn't (Zeitwerk::NameError)
raise Zeitwerk::NameError.new(msg, cref.last)
^^^^^
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:31:in `require'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:135:in `const_get'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:135:in `cget'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/eager_load.rb:169:in `block in actual_eager_load_dir'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:40:in `block in ls'
from /Users/youngcha/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.8/lib/zeitwerk/loader/helpers.rb:25:in `each'
I cannot appear to uninstall administrate either by calling "rails d administrate:install". How do I get past these errors? I tried renaming my controller back to the original name, but the error persists no matter what I do.
The text was updated successfully, but these errors were encountered:
I changed the name of a controller from "ReadOnlyDashboardController" to "ReadOnlyDashboardsController". This appears to have broken administrate's generator function, as I keep seeing this error when I run "rails g administrate:install"
If I try to run it again, I get a different error:
I cannot appear to uninstall administrate either by calling "rails d administrate:install". How do I get past these errors? I tried renaming my controller back to the original name, but the error persists no matter what I do.
The text was updated successfully, but these errors were encountered: