加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 如何通过rails-assets安装modernizr 3?

发布时间:2020-12-17 02:08:33 所属栏目:百科 来源:网络整理
导读:modernizr 2从 rails-assets开始易于安装. # Gemfilegem 'rails-assets-modernizr'# application.js//= require modernizr 但是,现代化的3个文档说: A lot has changed since the last version of Modernizr. There no longer is a single,base modernizr.j
modernizr 2从 rails-assets开始易于安装.

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

但是,现代化的3个文档说:

A lot has changed since the last version of Modernizr. There no longer is a single,base modernizr.js file. Instead,just head over to the Download page as you could have previously,and select the features you want to use in your project.
07001

这听起来好像我不能再从rails-assets获得modernizr 3了.这是真的?

正如所料,如果我尝试从rails-assets安装modernizr 3,我得到:

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

  couldn't find file 'modernizr' ...
  app/assets/javascripts/application.js:20

解决方法

我没有让v3工作.我通过更改我的gemfile来版本化为2.8.3:

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读