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

Impossible to load jquery-ui #124

Open
djass opened this issue Jul 3, 2017 · 12 comments
Open

Impossible to load jquery-ui #124

djass opened this issue Jul 3, 2017 · 12 comments

Comments

@djass
Copy link

djass commented Jul 3, 2017

Hello,

I installed jquery and jquery-ui. Above is a extract of bundle list :

  • jquery-rails (4.3.1)
  • jquery-ui-rails (6.0.1)
    But, I can't load jquery-ui in my application.js file. I had :
    //= require jquery
    //= require jquery-ui
    I got this error :
    couldn't find file 'jquery-ui' with type 'application/javascript'

It is actually ok with jquery but not for jquery-ui.

Did I missed something?

Djass

@bjensen
Copy link

bjensen commented Sep 7, 2017

Did you manage to fix this? If so how ? Please share

@johnantoni
Copy link

johnantoni commented Sep 23, 2017

same here, if i do per the documentation:

//= require jquery-ui

it says couldn't find jquery-ui

but if i do

//= require jquery-ui/core

it works, for the javascript.

now for the css (i'm using scss) i just can't get any of the stylesheets loading:

@import "jquery-ui/core";

or

@import "jquery-ui";

doesn't work

@JulienVerkest
Copy link

Same problem here

@hoahm
Copy link

hoahm commented Oct 26, 2017

I'm not the only one. It seems to be incompatible with Rails 5

@dachinat
Copy link

Same problem

@jasonperrone
Copy link

What does that mean? bundle exec rake what?

@reidcooper
Copy link

reidcooper commented Mar 1, 2018

I bailed on this gem and just included the source in vendor/ directory. So much easier. but takes away control from having individual files selected. I was having similar issues where I had no idea how to include any asset.

@adrianvalenz
Copy link

@reidcooper What do you mean "individual files selected"...what files? I came across this gem today while referring to RailsCasts Calendar (Revised) video where he uses this gem. Another thing I noticed in his video is that if you use this
//= require jquery.ui.datepicker in application.js and
*= require jquery.ui.datepicker in application.scss but I actually placed in @import "jquery.ui.datepicker"; because it is a SASS file and it only accepts @import and not //= require
it works fine and I could use the jquery-ui datepicker, but it seems the css doesn't load correctly...like some properties are missing...anyway...this is the link to the video: http://railscasts.com/episodes/213-calendars-revised?autoplay=true

It's annoying how this video has me require include jquery-ui with the dot syntax and the docs on this gem wants you using the forward/slashes/ugh!

Get it straight maintainers!

@adrianvalenz
Copy link

adrianvalenz commented Mar 1, 2018

. @reidcooper Yea so I'm using Rails 5.1.5 but I still have to use the syntax for Rails 4.2.1... if you use the dot syntax //= require jquery.ui.all then it should work...and for SASS @import "jquery.ui.all";

@reidcooper
Copy link

reidcooper commented Mar 1, 2018 via email

@swarshah
Copy link

swarshah commented Dec 7, 2020

If you are trying to load a CSS file in SCSS like application.scss then you have to specify the extension of css otherwise it will just look for scss file.

@import "jquery-ui/menu";

vs

@import "jquery-ui/menu.css";

@t3k4y
Copy link

t3k4y commented May 4, 2023

@import "jquery-ui/menu.css";

Thank you, i can confirm, that this is working in my sass setup

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