小编Leo*_*eoJ的帖子

找不到文件'dataTables/jquery.dataTables'Rails 4

我正在跟踪rails#340以在我的应用程序中实现数据表.

按照所有步骤我得到这个错误:找不到文件'dataTables/jquery.dataTables'

我正在使用rails 4,我发现教程中提到的一些文件我必须创建像application.css和products.js.coffee

的Gemfile

gem 'jquery-rails'
group :assets do 
  gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
  gem 'jquery-ui-rails'
end
Run Code Online (Sandbox Code Playgroud)

的application.js

//= require jquery
//= require dataTables/jquery.dataTables
//= require_tree .
Run Code Online (Sandbox Code Playgroud)

Application.js.coffee

 /* 
 * This is a manifest file that'll automatically include all the stylesheets available in this directory 
 * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at 
 * the top of the compiled file, but it's generally better to create a new file per style …
Run Code Online (Sandbox Code Playgroud)

datatable jquery datatables ruby-on-rails-4 jquery-datatables

4
推荐指数
1
解决办法
4788
查看次数