In order to get data tables working we need to require dataTables/src/demo_table_jui in Application.css. Now I have a custom application_day.css.
Now, whenever application_day.css is loaded its throwing this error on production and dev server:
ActionView::Template::Error (couldn't find file 'dataTables/src/demo_table_jui'
(in /home/app/assets/stylesheets/application_day.css:20)):
one more thing, I’m using this gem in group :assets for Data Tables:
gem 'jquery-datatables-rails', git: 'https://github.com/rweng/jquery-datatables-rails.git'
gem 'jquery-ui-rails'
These are the files included in application_day.css:-
*= require_self
*= require style.css
*= require stylesheet_day.css
*= require table.css
*= require table_style.css
*= require table_jq.css
*= require form.css
*= require form1.css
*= require jquery-ui-1.9.2.custom.min.css
*= require dataTables/src/demo_table_jui
*= require msn-form.css
Following your link – http://railscasts.com/episodes/340-datatables, some changes to consider –
Note– In the above, there is
githuband notgit. Do exactly like that.Note– In your question there is no
coreandthemein custom css. Place them in the same order as they appear.Also, dealing with data tables make sure you have following in
application.jsagain in order-