Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4627

Rails_Admin issue on rails 7.1.3

$
0
0

I have updated a rails 5.0 to rails 7.1.3 apps. I have made the choice to use jsbundling insteead of importmap, as it seems easier to handle my existing javascript file.

Now when I test the admin section of my site (admin was built using RailsAdmin 3), I realized that console return me some error. Here is what I see in the console.

enter image description here

Here is some information about the configuration I use.

In rails_admin.rb I have set:

```config.asset_source = :sprockets````

in application.rb I use zeitwerk as autoloader and when I run zeitwerk:check, it run without error.

I was using esbuild as bundler.

The issue seems to come from application.js.erb present in rails_admin gem. When I comment out some of those line from the file, the errors disappear from the console. Here is the content of the file.

//=  require 'rails-ujs'//=  require 'turbo'//=  require 'rails_admin/jquery3'//=  require 'jquery_nested_form'//=  require 'rails_admin/jquery-ui/effect'//=  require 'rails_admin/jquery-ui/widgets/sortable'//=  require 'rails_admin/jquery-ui/widgets/autocomplete'//=  require 'rails_admin/flatpickr-with-locales'//=  require 'rails_admin/popper'//=  require 'rails_admin/bootstrap'//=  require 'rails_admin/filter-box'//=  require 'rails_admin/filtering-multiselect'//=  require 'rails_admin/filtering-select'//=  require 'rails_admin/remote-form'//=  require 'rails_admin/nested-form-hooks'//=  require 'rails_admin/i18n'//=  require 'rails_admin/widgets'//=  require 'rails_admin/sidescroll'//=  require 'rails_admin/ui'//=  require 'rails_admin/custom/ui'<% if defined?(ActiveStorage) %>//= require activestorage<% end %><% if defined?(ActionText) && Rails.gem_version >= Gem::Version.new('7.0') %>//= require trix//= require actiontext<% end %>

Is somebody can help me understand what is going wrong, it will be very appreciated?

If you need more info let me know.


Viewing all articles
Browse latest Browse all 4627

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>