Git Product home page Git Product logo

Comments (9)

joliss avatar joliss commented on August 23, 2024

Curious.

The only technical difference between the css and js file is, vendor/assets/javascripts/jquery.ui.all.js is a plain JS file, while vendor/assets/stylesheets/jquery.ui.all.css.erb is preprocessed with Erb. Could that have something to do with it?

from jquery-ui-rails.

MGPalmer avatar MGPalmer commented on August 23, 2024

I've got the same problem. Also occuring when trying to load specific css, like the datepicker example from the README.

Update: It seems like this is more of an engine/asset pipeline issue. If I add jquery-ui-rails to the main app's Gemfile, everything works - but if I add it to the engine's Gemfile (or gemspec), the asset paths to the jquery-ui-rails gem are not added to the main app.

from jquery-ui-rails.

MGPalmer avatar MGPalmer commented on August 23, 2024

I think I've got it: In an engine, when using a gemspec, you need to require your dependencies, otherwise those dependencies' asset paths aren't added to the host app. I.e.:

module MyEngine
  class Engine < Rails::Engine
    require 'jquery-ui-rails'
  end
end

Found via:

http://stackoverflow.com/questions/12256291/dependency-included-in-gemspec-not-added-to-asset-pipeline-in-rails-engine

from jquery-ui-rails.

joliss avatar joliss commented on August 23, 2024

@xiaotian-bluekai did this solve it for you?

from jquery-ui-rails.

madx80 avatar madx80 commented on August 23, 2024

@MGPalmer solution worked for me.
Thanks

from jquery-ui-rails.

reggieb avatar reggieb commented on August 23, 2024
    1. I had the same problem and @MGPalmer's solution worked for me too.

Interestingly this only affected the css files. The javascript was working fine without this fix.

from jquery-ui-rails.

joshwlewis avatar joshwlewis commented on August 23, 2024

+1 thanks @MGPalmer

from jquery-ui-rails.

joliss avatar joliss commented on August 23, 2024

Very good (and very curious). I don't think this is something that needs fixing in jquery-ui-rails, is it? I'll go ahead and close this then.

from jquery-ui-rails.

ff-apujari avatar ff-apujari commented on August 23, 2024

Am still facing this issue, nothing worked for me so far :(

its indeed nothing to do with jquery-rails, as if I am commenting out @import 'jquery.ui.autocomplete'; I am getting similar error next for @import 'font-awesome';

Am using rails 4.0.9 with both main app and engine. my engine works fine with main app, but I am unable to rspec dummy app due to this error

from jquery-ui-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.