简体   繁体   中英

Could not find generator 'active_admin:install'

I just removed active_admin from my rails app and now trying to add active_admin again.

getmfile: gem 'activeadmin', github: 'activeadmin'

and I ran this command:

rails g active_admin:install

and I met this error:

Running via Spring preloader in process 4200
Expected boolean default value for '--markerb'; got :erb (string)
Could not find generator 'active_admin:install'. Maybe you meant 'devise:install', 'responders:install' or 'active_record:model'

update: I ran bundle install but no reaction

update: result of rails -T

rails about                               # List versions of all Rails frameworks and the environment
rails app:template                        # Applies the template supplied by LOCATION=(/path/to/template) or URL
rails app:update                          # Update configs and some other initially generated files (or use just upda...
rails assets:clean[keep]                  # Remove old compiled assets
rails assets:clobber                      # Remove compiled assets
rails assets:environment                  # Load asset compile environment
rails assets:precompile                   # Compile all the assets named in config.assets.precompile
rails bower:cache:clean                   # Clear the bower cache ('bower cache clean')
rails bower:clean                         # Attempt to keep only files listed in 'main' of each component's bower.json
rails bower:install[options]              # Install components from bower
rails bower:install:deployment[options]   # Install components from bower using previously generated bower.json
rails bower:install:development[options]  # Install both dependencies and devDependencies from bower
rails bower:install:production[options]   # Install only dependencies, excluding devDependencies from bower
rails bower:list                          # List bower components
rails bower:resolve[relative_directory]   # Resolve assets paths in bower components
rails bower:update[options]               # Update bower components
rails bower:update:prune[options]         # Update existing components and uninstalls extraneous components
rails cache_digests:dependencies          # Lookup first-level dependencies for TEMPLATE (like messages/show or comme...
rails cache_digests:nested_dependencies   # Lookup nested dependencies for TEMPLATE (like messages/show or comments/_...
rails db:create                           # Creates the database from DATABASE_URL or config/database.yml for the cur...
rails db:drop                             # Drops the database from DATABASE_URL or config/database.yml for the curre...
rails db:environment:set                  # Set the environment value for the database
rails db:fixtures:load                    # Loads fixtures into the current environment's database
rails db:migrate                          # Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)
rails db:migrate:status                   # Display status of migrations
rails db:rollback                         # Rolls the schema back to the previous version (specify steps w/ STEP=n)
rails db:schema:cache:clear               # Clears a db/schema_cache.dump file
rails db:schema:cache:dump                # Creates a db/schema_cache.dump file
rails db:schema:dump                      # Creates a db/schema.rb file that is portable against any DB supported by ...
rails db:schema:load                      # Loads a schema.rb file into the database
rails db:seed                             # Loads the seed data from db/seeds.rb
rails db:setup                            # Creates the database, loads the schema, and initializes with the seed dat...
rails db:structure:dump                   # Dumps the database structure to db/structure.sql
rails db:structure:load                   # Recreates the databases from the structure.sql file
rails db:version                          # Retrieves the current schema version number
rails dev:cache                           # Toggle development mode caching on/off
rails initializers                        # Print out all defined initializers in the order they are invoked by Rails
rails log:clear                           # Truncates all/specified *.log files in log/ to zero bytes (specify which ...
rails middleware                          # Prints out your Rack middleware stack
rails notes                               # Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)
rails notes:custom                        # Enumerate a custom annotation, specify with ANNOTATION=CUSTOM
rails restart                             # Restart app by touching tmp/restart.txt
rails routes                              # Print out all defined routes in match order, with names
rails secret                              # Generate a cryptographically secure secret key (this is typically used to...
rails stats                               # Report code statistics (KLOCs, etc) from the application or engine
rails test                                # Runs all tests in test folder
rails test:db                             # Run tests quickly, but also reset db
rails time:zones[country_or_offset]       # List all time zones, list by two-letter country code (`rails time:zones[U...
rails tmp:clear                           # Clear cache and socket files from tmp/ (narrow w/ tmp:cache:clear, tmp:so...
rails tmp:create                          # Creates tmp directories for cache, sockets, and pids

update: rails : 5.0.5 rvm: 2.4.1 os: mac

update: I ran bundle exec rails g active_admin:install but no reaction.

The issue is related with the spring preloader as stated in here

Restart the spring preloader and you should be able to run the activeadmin generator command.

Command to stop spring

$ ./bin/spring stop

将 gem 添加到您的 Gemfile:gem 'activeadmin'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM