4

I just deployed a Rails 5.1 application to the production server. Everything works fine, except that the CSS styles for the JQuery UI datepicker are not rendered. An unstyled calendar appears when clicking into a date field on the form. The other CSS styles are rendered.

I required the library in the app/assets/javascripts/application.js file:

//= require jquery-ui/datepicker

I also imported the css styles in the app/assets/stylesheets/application.scss file:

@import 'jquery-ui/datepicker.css';

The Datepicker works fine in development, however when I check with Google Developer tools in production, it seems that the request for the datepicker.css is receiving a 404 status. Not sure why this is the case. Maybe I should install some extra stuff on the production server?

any advice or help is welcome,

Anthony

Toontje
  • 1,415
  • 4
  • 25
  • 43

1 Answers1

0

I fixed the issue by adding

/*
*= require jquery-ui
*/

to the top of the app/assets/stylesheets/application.scss file.

Toontje
  • 1,415
  • 4
  • 25
  • 43