gpt4 book ai didi

ruby-on-rails - Ruby on Rails : "couldn' t find file 'jquery-ui' "

转载 作者:行者123 更新时间:2023-12-03 13:42:36 24 4
gpt4 key购买 nike

我刚刚完成了全新安装,并且能够访问 localhost:3000 上的默认 Rails 页面,但是当我安装 activeadmin gem 时,我在访问/admin/时遇到了问题,并在/admin/login 上收到以下错误(我被重定向,但这是我在页面上看到的:)

我该怎么办?我已经完成了捆绑更新,但没有修复它。

这是部分错误消息:

Sprockets::FileNotFound in Active_admin/devise/sessions#new

Showing /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activeadmin->0.6.0/app/views/layouts/active_admin_logged_out.html.erb where line #12 raised:

couldn't find file 'jquery-ui' (in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activeadmin->0.6.0/app/assets/javascripts/active_admin/base.js:2)



这是我的 gem 文件:
source 'https://rubygems.org'

gem 'rails', '3.2.12'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby

gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'
gem 'activeadmin'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

最佳答案

这是 known issue由于 jquery-rails依赖放弃 jQuery-UI 支持。目前的解决方法似乎是强制 jquery-rails使用 2.3.0 版加载的 gem:

gem 'jquery-rails', '~> 2.3.0'

与此相关的问题: Debug jQueryUI Versions in Rails .

关于ruby-on-rails - Ruby on Rails : "couldn' t find file 'jquery-ui' ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17053650/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com