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

本文介绍如何在使用新版jQuery Rails (版本大于2.3.0)时正确配置jQuery UI。对于版本3.0.0及更高版本,需要安装并配置jquery-ui-rails gem以确保应用程序正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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"


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值