data-confirm-modal icon indicating copy to clipboard operation
data-confirm-modal copied to clipboard

//= require data-confirm-modal does not work after installing the gem

Open chrilleferna opened this issue 6 years ago • 4 comments

I installed them gem and inserted the //= require data-confirm-modal in application.js This resulted in a Sprocket error with message: couldn't find file 'data-confirm-modal' with type 'application/javascript'

So I had to add the data-confirm-modal.js manually to my assets/javascripts directory :-(

chrilleferna avatar Feb 27 '18 20:02 chrilleferna

Hello, this is bizarre. Did you restart the server after installing the gem? Care to provide the Rails version you're using?

Thanks

vjt avatar Mar 10 '18 11:03 vjt

It doesn't work for me either I follow the instructions and I restarted the server but I still get the same js console error:

Uncaught Error: The bootstrap modal plugin does not appear to be loaded.

I use Bootstrap 4 and Rails 5.1.2.

sabatesduran avatar Nov 16 '18 12:11 sabatesduran

I'm getting the same error as well when running rails assets:precompile

jesusabarca avatar Jan 14 '19 17:01 jesusabarca

Nvm, the gem was included only for development and testing, that's why we were getting the error in production 😅

jesusabarca avatar Jan 14 '19 18:01 jesusabarca