Sprockets :: FileNotFound找不到文件'jquery'
嘿,我是新的铁轨,我卡在这里
这是我的应用程序.HTML.erb错误是在JavaScript包含标记(第6行)当我删除行我没有得到一个错误我试图做下面没有工作无法找到文件'jquery'中Rails项目我重启我的服务器几次并没有帮助最后一件事,当我打开我的旧项目它的工作,但任何新的同样的错误
<!DOCTYPE html>
<html>
<head>
<title>Appmind</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
application.js的内容
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
gemfile内容
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-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', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
跟踪
Rails.root: C:/aptanastudio3/appmind
Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___663637225_30053304'
任何帮助,将不胜感激谢谢
我发现,当我的gem'jquery-rails'被包装在一个组中时:资产阻塞,那么它不起作用。 但是我将它从模块中移除,现在它使用了最现代化的导轨。 这与你的情况不同,但我认为切换它可能是有效的。
链接地址: http://www.djcxy.com/p/19283.html上一篇: Sprockets::FileNotFound couldn't find file 'jquery'
下一篇: c++