当前位置: 代码迷 >> 综合 >> couldn't find file 'jquery.ui.effect-blind' with type 'application/javascript'
  详细解决方案

couldn't find file 'jquery.ui.effect-blind' with type 'application/javascript'

热度:17   发布时间:2023-12-14 04:48:36.0

I think you are using new version (your version > 2.3.0) of jquery-rails.

jQuery UI has been removed from jquery-rails gem,

  • ≤ jquery-rails v2.3.0 still have jQuery UI
  • ≥ jquery-rails v3.0.0 jQuery UI removed

Take a look this commit.

If you are using ≥ jquery-rails v3.0.0 or latest version of jquery-rails

You should use jquery-ui-rails gem for using jquery UI in rails, https://github.com/joliss/jquery-ui-rails.

In your Gemfile, add:

gem 'jquery-ui-rails'

and run bundle install

  1. v2.3.0 < your version ≤ v4.2.1

    And put this into application.js

    //= require jquery.ui.all

    then put this into application.css

    *= require jquery.ui.all
  2. ≥ jquery-ui-rails v5.0.0 or latest version

    And put this into application.js

    //= require jquery-ui

    then put this into application.css

    *= require jquery-ui

    or to use specific modules read this

Don't forget restart your server.

If you are using ≤ jquery-rails v2.3.0

see my answer here http://stackoverflow.com/a/16996710/1297435 for use gem 'jquery-rails', "~> 2.3.0"


  相关解决方案