administrate:install does not exist
-
What were you trying to do? I installed the administrate gem via git for tag: "v1.0.0.beta3" since the stable version does not have Rails 8 support and hits the Sprocket dependency wall.
-
What did you end up with (logs, or, even better, example apps are great!)? Once I install the gem I tried doing the next step which is
bin/rails g administrate:installbut ended up with this error.
Could not find generator 'administrate:install'. (Rails::Command::CorrectableNameError)
Did you mean? administrate:views
Run `bin/rails generate --help` for more options.
But bin/rails generate --help does not list install for administrate
Administrate:
administrate:dashboard
administrate:field
administrate:view
administrate:views
administrate:views:edit
administrate:views:field
administrate:views:form
administrate:views:index
administrate:views:layout
administrate:views:navigation
administrate:views:new
administrate:views:show
Not sure how the get it working now.
- What versions are you running?
- Rails - 8.0.1
- administrate - 1.0.0.beta3
Hm, that's odd. I created a quick demo app and it's listed fine:
Administrate:
administrate:assets
administrate:assets:javascripts
administrate:assets:stylesheets
administrate:dashboard
administrate:field
administrate:install
administrate:routes
administrate:view
administrate:views
administrate:views:edit
administrate:views:field
administrate:views:form
administrate:views:index
administrate:views:layout
administrate:views:navigation
administrate:views:new
administrate:views:show
Is there anything potentially special about your Rails application that might be interfering?
FWIW I am experiencing the exact same thing. Rails 8.0.3, administrate 1.0.0.beta3.
Administrate:
administrate:dashboard
administrate:field
administrate:view
administrate:views
administrate:views:edit
administrate:views:field
administrate:views:form
administrate:views:index
administrate:views:layout
administrate:views:navigation
administrate:views:new
administrate:views:show
This is a very stock rails install, new app. Any guidance would be appreciated.
I'm curious about how this could happen, especially as I don't seem to be able to replicate it:
$ rails new install_demo --database=postgresql --skip-rubocop \
--skip-test --skip-spring --skip-brakeman --skip-ci --skip-kamal --skip-solid
(This is slightly modified from my create-administrate-demo script to make it a bit more stock.)
# Gemfile
gem "administrate", "1.0.0.beta3"
$ be rails g
[...]
Administrate:
administrate:dashboard
administrate:field
administrate:install
administrate:routes
administrate:view
administrate:views
administrate:views:edit
administrate:views:field
administrate:views:form
administrate:views:index
administrate:views:layout
administrate:views:navigation
administrate:views:new
administrate:views:show
Could one of you perhaps share a broken version via a repo?
@nickcharlton here's our team's Rails starter project with administrate 1.0.0.beta3 installed. Our repo is basically stock rails + a handful of gems configured the way our team likes to use them. Nothing crazy, you can find everything documented in the Gemfile.
https://github.com/apsislabs/rails_starter/tree/example/administrate
Here's my repro:
git clone https://github.com/apsislabs/rails_starter.git
git checkout example/administrate
bundle install
bin/rails g
I get this:
Administrate:
administrate:dashboard
administrate:field
administrate:routes
administrate:view
administrate:views
administrate:views:edit
administrate:views:field
administrate:views:form
administrate:views:index
administrate:views:layout
administrate:views:navigation
administrate:views:new
administrate:views:show
Some other details:
❯ bundler --version
Bundler version 2.7.2
❯ ruby --version
ruby 3.4.5 (2025-07-16 revision 20cda200d3) +PRISM [arm64-darwin20]
Great, thanks! Yeah, I can see that now myself. Wild.
It's the same with current main as well.
Hmm, I wonder what could be going on…
I figured I'd just run it out of curiousity to see if it was just missing from the list, but I get:
$ be rails g administrate:install
/Users/nickcharlton/.gem/ruby/3.4.6/gems/slayer-0.5.4/lib/slayer/command.rb:14: warning: Skipping set of ruby2_keywords flag for call (method accepts keywords or post arguments or method does not accept argument splat)
[WARNING] Could not load generator "generators/administrate/install/install_generator". Error: expected file /Users/nickcharlton/projects/apsislabs/rails_starter/app/app/services/error_service.rb to define constant Services::ErrorService, but didn't.
Do you think that could be related? That seems like something specific to your starter project.
@nickcharlton brilliant. Yes, we had an errant double file definition for ErrorService. This wasn't the case in the real project where we were having the trouble, but attempting to run the administrate:install command even though it didn't appear in the list resulted in uncovering a different Zeitwork error.
Not sure how (or if it's worth) doing any kind of root cause on this, but I think this basically amounts to loading the administrate:install task may encounter Zeitwork filename/classname disagreements that are not exercised by starting and running rails (even in production), which is silently swallowed unless you explicitly try to run rails g administrate:install.
Ah yeah, that seems it.
I'm inclined to think it's a problem with your application structure rather than Administrate, otherwise we'd've seen this issue a lot more frequently (and earlier than now). Unfortunately, I'm not sure if there's much more I can help with here, but if you do see something we could change in Administrate, please re-open the issue and we can have a look.