rweng / jquery-datatables-rails

jquery-datatables gem for rails
MIT License
564 stars 339 forks source link

Could not find jquery-datatables-rails-2.1.10.0.2 in any of the sources #108

Closed sushant2675 closed 10 years ago

sushant2675 commented 10 years ago

Hi @ricardodovalle , Thanks for your reply. Sorry, I could not understand by the statement 'Are you using rvm, rbenv or chruby?' I have both rvm and rbenv in my system.

Did Rubymine set to the same ruby bin? - Yes

Did you install nodejs or therubyracer? - therubyracer

My Gemfile:

source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0.rc2'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

gem 'devise'

gem "therubyracer"
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS

# twitter bootstrap css & javascript toolkit
gem 'twitter-bootswatch-rails', '~> 3.2.0'

# twitter bootstrap helpers gem, e.g., alerts etc...
gem 'twitter-bootswatch-rails-helpers'

gem 'twitter-bootstrap-rails'

gem 'paper_trail', '~> 3.0.3'

gem "pundit"

# gem 'jquery-datatables-rails', '~> 2.1.10.0.2'

My application.js:

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require turbolinks
//= require dataTables/jquery.dataTables
//= require dataTables/bootstrap/2/jquery.dataTables.bootstrap
//= require_tree .

// For fixed width containers
$('.datatable').dataTable({
    "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
    "sPaginationType": "bootstrap"
});

My application.css:

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any styles
 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
 * file per style scope.
 *
 *= require_self
 *= require bootstrap_and_overrides
 *= require dataTables/jquery.dataTables
 *= require dataTables/bootstrap/2/jquery.dataTables.bootstrap
 */

Thanks again. Regards, Sushant

ricardodovalle commented 10 years ago

@sushant2675 I edited your issue. I saw jquery-datatables-rails commented at you Gemfile (last line), but i think that error persist at your code same uncommented that line.

About the question:'Are you using rvm, rbenv or chruby?' , Is it how do you installed ruby? they are ruby version manager.

Only for curiosity, what operations system are you using?

It is a strange error, could you try at your terminal, inside your project folder, to skip Redmine:

$ bundle install
$ bundle exec rails s

I will try creating a project to test.

sushant2675 commented 10 years ago

Hi @ricardodovalle,

I think I am using rvm as I see rvm/bin in my PATH.

Thanks

sushant2675 commented 10 years ago

Hi @ricardodovalle,

I am on Mac os x 1.9.3.

Thanks

sushant2675 commented 10 years ago

Hi @ricardodovalle, Yes, if I skip RubyMine then I do not get the error. One dumb question though, to use it souldn't my table tag be <datatable>...</datatable>

Thanks

ricardodovalle commented 10 years ago

@sushant2675, I think you are with a trouble with the ruby manager, maybe Rubymine are getting the wrong ruby, because there are the ruby from system (global) and the the local ruby (rvm). I almost finished a simple project: https://github.com/ricardodovalle/jquery-datatables-bootstrap2 I was trying only to solve a small error with the json format. (There are errors)

Take care with Rubymine, I don't know if the IDE knows how to use rvm. I have used Sublime Text and I am testing Github Atom.

ricardodovalle commented 10 years ago

@sushant2675

About the tag <datatable>, i don't think so because this html tag doesn't exit. http://www.w3schools.com/tags/

ricardodovalle commented 10 years ago

@sushant2675 May I close the thread?

sushant2675 commented 10 years ago

Hi @ricardodovalle,

Sorry the IDE Rubymine was running on another version of ruby. Sorry for the trouble. Thanks a lot for your help. Kindly close the thread.

Regards, Sushant

ricardodovalle commented 10 years ago

Thank you @sushant2675 for using the gem. Any doubts, just ask.

Best regards. Ricardo