Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't find file 'dataTables/jquery.dataTables.bootstrap3' #94

Closed
nekapoor opened this issue Apr 30, 2014 · 11 comments
Closed

couldn't find file 'dataTables/jquery.dataTables.bootstrap3' #94

nekapoor opened this issue Apr 30, 2014 · 11 comments

Comments

@nekapoor
Copy link

Hello,

I followed your instructions and in my app, I get this error. I'm not sure if anyone else has experienced this, but I have no idea how to solve it.

Any ideas would be greatly appreciated. Thanks so much.

@ricardodovalle
Copy link
Collaborator

@nekapoor It is weird.

You got the error at production or development environment?
What version of gem are you using?
Could you post your Gemfile, application.css and application.js, please?

@nekapoor
Copy link
Author

I get this in my development environment. I've pasted the relevant code below. Thank you so much.

APPLICATION.JS

//= require jquery
//= require jquery_ujs.js
//= require dataTables/jquery.dataTables
//= require dataTables/jquery.dataTables.bootstrap3

//= require_tree .

APPLICATION.CSS:

*= require_self
*= require dataTables/jquery.dataTables
*= require dataTables/jquery.dataTables.bootstrap3

*= require_directory .

GEMFILE:

source 'https://rubygems.org'

ruby "1.9.3"
gem 'rails', '~> 3.2'
gem 'jquery-rails'
gem 'unicorn' #roll back to this gem 'thin'
gem 'devise', '3.0.3'
gem "omniauth-facebook"
gem "omniauth-google-oauth2"
gem 'bigbluebutton-api-ruby'
gem "exception_notification", :git => "git://github.com/rails/exception_notification", :require => 'exception_notifier'

gem 'rails_admin', '0.4.9'
gem 'cancan'
gem 'haml'
gem 'sidekiq'
gem 'slim'
gem 'sinatra', :require => nil
gem 'clockwork'
gem 'less-rails'
gem 'therubyracer', platforms: :ruby
gem 'surveyor'
gem "paperclip" #, "~> 3.0"
gem 'ancestry'
gem 'wiziq-ruby', github: 'LearnToBeFoundation/wiziq-ruby'
gem 'kaminari'
gem 'bootstrap-kaminari-views'
gem 'twilio-ruby'
gem "recurrence", :require => "recurrence/namespace"
gem 'json'
gem 'acts-as-taggable-on'
gem 'useragent'
gem 'hub'
gem 'pg'
gem 'bitly'
gem 'active_attr'
gem 'jquery-datatables-rails', git: 'git://github.com/rweng/jquery-datatables-rails.git'

group :development, :test do
gem 'thin'
gem 'rspec-rails'
gem 'shoulda-matchers'
gem 'coderay', '~> 1.0.5'
gem 'jazz_hands', github: 'nixme/jazz_hands'
gem 'rb-fsevent'
gem 'guard-rspec'
gem 'factory_girl_rails'
gem 'quiet_assets'
end

group :development do
gem "better_errors"
gem "binding_of_caller"
end

group :test do
gem 'fivemat'
end

group :assets do
gem 'sass-rails', '> 3.2.3'
gem 'coffee-rails', '
> 3.2.1'
gem 'jquery-ui-rails'

gem 'uglifier', '>= 1.0.3'
end

group :production, :staging do
gem 'newrelic_rpm'
end

@ricardodovalle
Copy link
Collaborator

Please, try with a closed version:

gem 'jquery-datatables-rails', '~> 1.12.2'

This version 1.12.2 I am using at production at a client product and it is working.
I did a lot of update yesterday, but I created a "dev" branch to avoid troubles, maybe I did some mistake at master branch.

I will look closer your files and the master branch

@nekapoor
Copy link
Author

it worked! thank you so much!

@Vadorequest
Copy link

I had the same issue, I tried to install the gem based on the dev branch but it failed.

Finally:
gem 'jquery-datatables-rails', '~> 1.12.2', git: 'git://github.com/rweng/jquery-datatables-rails.git'

Worked. Thanks.

@ricardodovalle
Copy link
Collaborator

@Vadorequest I am working at dev branch, there a lot of error.

It is weird, because you don't need to add github address with you are using a closed version like '1.12.2'

Did you try only gem 'jquery-datatables-rails', '~> 1.12.2' ?

Thanks.

@Vadorequest
Copy link

Oh, I didn't try without the git url, because that was in the example in the README. My mistake was to try to use the dev branch.

@ricardodovalle
Copy link
Collaborator

#98 merged
If the error persist, please reopen

@baxang
Copy link

baxang commented Jun 10, 2014

I ran into the same problem in production (works fine in development env) with the gem version 1.12.2.

ActionView::Template::Error (couldn't find file 'dataTables/jquery.dataTables.bootstrap3'

Reading previous comments, I think the error should have been fixed. I would love to hear any idea. Thank you!

@heber28
Copy link

heber28 commented Feb 21, 2015

i get the same error, but i changed the asset files in this way:

app/assets/javascripts/application.js

//= require dataTables/jquery.dataTables
//= require dataTables/bootstrap/2/jquery.dataTables.bootstrap

app/assets/stylesheets/application.css

*= require dataTables/bootstrap/2/jquery.dataTables.bootstrap

because i was using bootstrap 2
https://github.com/rweng/jquery-datatables-rails

this worked fine

@stevenm
Copy link

stevenm commented Feb 27, 2016

I had a much simpler reason, the installer had inserted the require line in my application js

//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap

BEFORE the Bootstrap require line

swapping them around so require bootstrap first then data tables solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants