plentz / jquery-maskmoney

jQuery plugin to mask data entry in the input text in the form of money (currency).
https://plentz.github.io/jquery-maskmoney/
MIT License
964 stars 505 forks source link

How integrate jquery.maskMoney with Rails 6 #267

Open saferodrigo opened 4 years ago

saferodrigo commented 4 years ago

Is it possible to use the jquery.maskMoney library with rails 6? If so, how to integrate into application.js? All my attempts to load the library with rails 6 were in vain.

I'm using:

rails 6
jquery 3.4.1
jquery-migrate 3.3.1
jquery.browser 0.1.0
sonu1989 commented 4 years ago

I also tried a lot to fix this issue but didn't get any success. I am using

rails 6.0.3.1
ruby 2.6.2

I followed the below steps. $ yarn add jquery-maskmoney after this package added successfully into yarn.lock and package.json

yarn.lock Screenshot from 2020-08-21 13-12-03

package.json

Screenshot from 2020-08-21 13-12-15

Now require jquery-maskmoney in application.js app/javascript/packs/application.js require("jquery-maskmoney")

Getting below error Screenshot from 2020-08-21 13-19-12

Can you please help me to fix this issue? If you need more information please let me know. Thank you so much in advance.