0

我在 Rails 5.1 应用程序上安装了xray-rails,但按下键盘快捷键什么也没做。我已经清除了缓存资产rails tmp:clear。有任何想法吗?

4

1 回答 1

1

Rails 5.1 删除了 jQuery 作为依赖项。将其显式添加到 Gemfile:

group :development do
  gem 'xray-rails'
  gem 'jquery-rails' # add it outside the group if you need it globally
end

然后在 application.js 中导入:

//= require jquery

您可以再次使用 Cmd + Shift + X。

于 2017-06-07T18:50:15.000 回答