Skip to content

Importmap is optional, but raise error if it is not installed. #8298

@martinGerez

Description

@martinGerez

I've installed ActiveAdmin v4.0.0.beta5, but fails on app execution with the error:

uninitialized constant #<Class:ActiveAdmin>::Importmap

That comes from lib/active_admin.rb.

Digging into that file, I've noticed that the requirement of 'importmap-rails' is optional:

begin
  require "importmap-rails"
rescue LoadError
  # importmap-rails is optional
end

But still fails when trying to load and instantiate Importmap.new.

Currently, we are using Rails 7.0, with Esbuild + Propshaft.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions