Sachin Prasad
Sachin Prasad

Reputation: 5411

datatables with rails issue

I have included this in my rails:

gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'

but when I start the server I'm getting this error :

←[31mYou passed :github as an option for gem 'jquery-datatables-rails', but it is invalid.←[0m

I guess its because I'm running it locally.BTW,what will be my path if I'm running it locally?

1 more thing I followed this cast:

http://railscasts.com/episodes/340-datatables?view=asciicast

I have also tried simply this:

gem 'jquery-datatables-rails'

But after bundle install the css and js files are not downloaded and it is giving me file not found error.

Upvotes: 1

Views: 588

Answers (2)

lab419
lab419

Reputation: 1258

Difficult to say why your table is hidden without the view and associated javascript code.

Check if you call the dataTable() function on the correct table DOM element. Also check for any fancy parameters in the call.

If that checks out, post the code for more help.

Upvotes: 1

dimuch
dimuch

Reputation: 12818

Check the cast:

The github option is new in Bundler 1.1. If you don’t have this you’ll need to pass in the full git path instead.

So try to use

gem 'jquery-datatables-rails', git: 'https://github.com/rweng/jquery-datatables-rails.git'

Upvotes: 2

Related Questions