how does require jquery work in Rails 3 app?

Viewed 4669

In my rails 3 app it has:

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

And it works fine. But I don't understand how it works. I think I understand the third line which I believe adds everything to this file that is found in the same directory as this file (/app/assets/javascript). But what about the first line? Where does it get the jquery file? I don't see it in any of the directories it mentions in the comment at the beginning of the file, specifically:

// 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.

Where does rails go to get the jquery javascript file?

3 Answers
Related