How to install upgradeizr 3 via rails-assets?

modernizr 2 is easy to install from rails-assets .

# Gemfile
gem 'rails-assets-modernizr'
# application.js
//= require modernizr

However, modern 3 documents say:

Much has changed since the latest version of Modernizr. There is no longer a single modernizr.js base file. Instead, simply go to the Download page, as before, and select the features you want to use in your project. https://modernizr.com/docs/

It sounds as if I can no longer upgrade 3 of the rails assets. It's true?

As expected, if I try to install upgradeizr 3 from rails-assets, I get:

An ActionView::Template::Error occurred ...

  couldn't find file 'modernizr' ...
  app/assets/javascripts/application.js:20
+4
source share
1

v3 . 2.8.3, gemfile :

source 'https://rails-assets.org' do
  gem 'rails-assets-respond'
  gem 'rails-assets-modernizr', '2.8.3'
end
+1

Source: https://habr.com/ru/post/1608374/


All Articles