简体   繁体   English

我如何从 jquery-ui-rails gem 版本中找出 JQuery UI 的版本?

[英]How do i figure out the version of JQuery UI from version of jquery-ui-rails gem?

I'm using Rails 4.2.7.我正在使用 Rails 4.2.7。 In my Gemfile, I have在我的 Gemfile 中,我有

gem 'rails', '~> 4.2.7'
…
gem 'jquery-ui-rails'

How do I figure out what version of JQuery UI I'm using?如何确定我使用的是哪个版本的 JQuery UI?

bundle show jquery-ui-rails

This command will show you which version of that gem is being used in your project.此命令将显示您的项目中正在使用该 gem 的哪个版本。 You can also inspect your Gemfile.lock file or type您还可以检查您的 Gemfile.lock 文件或类型

bundle show

to display all the gems being used.显示所有正在使用的宝石。

To see the version of the jquery-ui plugin being used by any website, you can open the console tab in the developers tools of your browser and then type:要查看任何网站使用的 jquery-ui 插件的版本,您可以在浏览器的开发人员工具中打开控制台选项卡,然后键入:

$.ui

You look in the file VERSIONS.md , in which you can see the following (top five lines):您查看文件VERSIONS.md ,您可以在其中看到以下内容(前五行):

5.0.5   1.11.4
5.0.4   1.11.3
5.0.3   1.11.2
5.0.2   1.11.2
5.0.1   1.11.1

From the JQuery UI RailsREADME file:来自 JQuery UI RailsREADME文件:

See VERSIONS.md to see which versions of jquery-ui-rails bundle which versions of jQuery UI.请参阅 VERSIONS.md 以查看哪些版本的 jquery-ui-rails 捆绑了哪些版本的 jQuery UI。

  1. Use bundle show to know the version of jquery gem -使用 bundle show 了解 jquery gem 的版本 -

     bundle show jquery

    It will list something like -它会列出类似 -

     1 : jquery-rails 2 : jquery-ui-rails 3 : rails-jquery-autocomplete 0 : - exit -
  2. Select the appropriate option.选择适当的选项。 In my system on selection of 2(jquery-ui-rails) it displayed -在我选择 2(jquery-ui-rails) 的系统中,它显示 -

     .../jquery-ui-rails-6.0.1
  3. Check the gem to jquery version mapping @ https://github.com/jquery-ui-rails/jquery-ui-rails/blob/master/VERSIONS.md .检查 gem 到 jquery 版本映射 @ https://github.com/jquery-ui-rails/jquery-ui-rails/blob/master/VERSIONS.md In my case it was就我而言,它是

    Gem jQuery UI 6.0.1 1.12.1

Note: I have combined @Hans Findel and @MarsAtomic answer.注意:我结合了@Hans Findel 和@MarsAtomic 的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM