首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >ActionView::Template::Error (找不到文件)

ActionView::Template::Error (找不到文件)
EN

Stack Overflow用户
提问于 2018-06-08 19:12:56
回答 1查看 1.5K关注 0票数 1

我已经更新了我的应用程序到rails 5.1和狂欢到spree 3.5,这导致了最新的几个问题。

  ActionView::Template::Error (couldn't find file 'jquery.validate/jquery.validate.min' with type 'application/javascript'

我尝试过安装像gem 'jquery-rails' gem 'rails-ujs,'~> 0.1.0' gem "jquery-ui-rails" gem 'jquery-validation-rails'这样的gem,甚至把这些文件添加到了我的JavaScript文件夹中。

还是没有成功。

有人知道问题的原因和如何解决它吗?

gemfile

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails'
# Use sqlite3 as the database for Active Record
# gem 'sqlite3'
gem 'pg', '< 1'
# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails'
# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
gem 'truncate_html', '~> 0.9.3'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'rails-ujs', '~> 0.1.0'
gem "jquery-ui-rails"
gem 'jquery-validation-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', group: :doc

gem 'rake'
gem 'rspec'
gem 'kramdown'
gem 'thor', '0.19.1'
gem 'spree_braintree_vzero', github: 'spree-contrib/spree_braintree_vzero'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

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

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development


group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  gem 'capistrano-passenger'
  gem 'capistrano-rails'
  gem 'capistrano-rvm'

end

group :development do

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

gem 'spree', '~> 3.5.0.rc2'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
gem 'devise'
gem 'materialize-sass'
gem 'active_link_to'
#gem 'mollie-api-ruby', '< 3.2'
# gem 'spree_mollie', github: 'salman15/mollie_spree_2017', branch: 'stable'
#gem 'spree_mollie', github: 'ttcremers/spree_mollie', branch: 'stable'
gem 'spree_mail_settings', github: 'spree-contrib/spree_mail_settings'
# gem 'spree_i18n', github: 'spree-contrib/spree_i18n'
# gem 'spree_globalize', github: 'spree-contrib/spree_globalize', branch: 'master'
gem "mini_magick"
gem 'spree_mollie_gateway'
# gem 'rails-i18n', github: 'svenfuchs/rails-i18n', branch: 'rails-4-x' # For 4.x
# gem 'globalize', '~> 5.1.0'

all.js/application.js

    // This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require jquery.validate
//= require spree/frontend

//= require_tree .
//= require spree/frontend/spree_auth
//= require spree/frontend/spree_braintree_vzero
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-08 21:36:43

这解决了我的问题:我只是删除了这一行

//= require jquery.validate/jquery.validate.min

来自frontend.js

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50759383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档