Rails 3.1 Assets Pipeline precompilation error - could not find 'jquery' file

I am updating a Rails 3.1 application to use the asset pipeline. I included the jquery-rails pearl in my Gemfile and installed using bundle install .

 Using jquery-rails (1.0.19) 

My application.js file in the app / assets / javascripts directory looks like this:

 // ... //= require jquery //= require jquery_ujs //= require jquery-ui //= require_tree . ... 

When I run bundle exec rake assets:precompile , I get the following error:

 ** Invoke assets:precompile (first_time) ** Execute assets:precompile /Users/augus164/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /Users/augus164/.rvm/gems/ruby-1.9.3-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace ** Invoke assets:precompile:all (first_time) ** Execute assets:precompile:all ** Invoke assets:precompile:primary (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment ** Invoke tmp:cache:clear (first_time) ** Execute tmp:cache:clear ** Execute assets:precompile:primary rake aborted! couldn't find file 'jquery' 

I understand that by turning on the jquery-rails gem, I don’t need to include the jquery library in the javascripts directory or link to it from Google Cdn. Does anyone know what I am missing?

+4
source share
1 answer

If you use rails 3.1, you do not need a gem. It is included with rails by default.

0
source

Source: https://habr.com/ru/post/1401902/


All Articles