在我尝试集成administrate-field-nested_has_many
插件之前,我的应用程序(Rails 6.1.3/Administrate v0.16(正在运行。
我刚刚添加了gem和bundle,现在当我加载任何管理员页面时都会出现这个错误:
Sprockets::Rails::Helper::AssetNotPrecompiled in Admin::Users#index
Showing /app_path/app/views/admin/application/_stylesheet.html.erb where line #11 raised:
administrate-field-nested_has_many/application.css
Extracted source (around line #11):
9
10 <% Administrate::Engine.stylesheets.each do |css_path| %>
11 <%= stylesheet_link_tag css_path %>
12 <% end %>
13
Application Trace | Framework Trace | Full Trace
app/views/admin/application/_stylesheet.html.erb:11
app/views/admin/application/_stylesheet.html.erb:10:in `each'
app/views/admin/application/_stylesheet.html.erb:10
app/views/layouts/admin/application.html.erb:24
这是当前版本的administrate-field-nested_has_many
的已知问题,队列中当前有一个PR应该可以解决它(请参阅https://github.com/nickcharlton/administrate-field-nested_has_many/pull/45)。
目前,您应该能够通过在manifest.js
:中添加以下行来解决此问题
// Add to app/assets/config/manifest.js
//= link administrate-field-nested_has_many/application.js
//= link administrate-field-nested_has_many/application.css
您应该尝试https://github.com/omohokcoj/motor-admin-它是Rails的现代管理员引擎,具有更多功能和强大的UI(不需要链轮,一切都可以开箱即用(