jeudi 28 janvier 2016

how to include css file for datepicker jquery ui in ROR

I am trying to set a date picker on a field in ruby using gem jquery-ui-rails. Here is my gemfile code

gem 'rails', '4.2.5'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'coffee-script-source', '~> 1.8.0'
gem 'jquery-rails', '~> 2.3.0'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

and this is my application.js file

//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require jquery-ui

I have included a css file in application.css file of the application. which contains

 *= require_tree .
 *= require_self
 *= require jquery.ui.all

When I click on the date picker field it displays the datepicker but no css but if in order to include the css file I use *= require jquery.ui.all or *= require jquery-ui then I gives an error that whhich is File not found. I have tried server restarting and everything else that was given in other posts on stack overflow but I didn't understand where I am lacking. I actually want to add the css file of datepicker. I have wasted a lot of time in doing this. Any help would be appreciated...

Aucun commentaire:

Enregistrer un commentaire