Sprockets :: FileNotFound could not find file 'jquery'

Hey guys, I'm new to rails and I'm stuck here in this place.

This is my application .HTML.erb Error in the JavaScript include tag (line 6) when I delete the line, I don’t get the error, I tried the following, it didn’t work, I could not find the jquery file in the Rails project I restarted my server a couple of times, it didn’t help anyone when I open my old projects, but all new are the same mistakes

<!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> 

contents of 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 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 contents

 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] 

track

 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' 

any help would be appreciated thanks

+7
jquery ruby-on-rails
source share
1 answer

I found that when my gem "jquery-rails" was wrapped in a group: assets are locked, then this did not work. But I removed it from the block, and now it uses the most modern rails. This is different from your situation, but I think it can be effective.

+3
source share

All Articles