Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6766339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:49:07+00:00 2026-05-26T14:49:07+00:00

When using asset pipeline in rails 3.1, it creates a default application.js : //=

  • 0

When using asset pipeline in rails 3.1, it creates a default application.js:

//= require jquery
//= require jquery_ujs
//= require_tree .

but when will I need include all of my javascript? In most cases we use different javascrips for different controllers/views?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:49:08+00:00Added an answer on May 26, 2026 at 2:49 pm

    require_tree . will result in you having a single file (application.js in this case) holding all your scripts that is there in the folder. And the fact that browsers will only pull that file once from your web server (unless you do a Ctrl + R refresh or there is a change in file cache property), does make the apps behave faster for subsequent requests.

    Unless of course you have an application that have quite varying and huge scripts and a typical user is not expected to move around much that he wouldn’t need majority of those. Which obviously is not very common case.

    for additional and detailed information. look here
    http://guides.rubyonrails.org/asset_pipeline.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just getting into the Asset Pipeline; I'm using SASS/SCSS, but I'm not understanding
I am using Rails 3.1 w/asset pipeline, phusion 3.0.x and apache 2.2.17. In the
I'm using Rails 3.1 and SCSS in the Asset Pipeline. Is there anyway to
i'm using the asset pipeline with rails 3.1 and less. i have my images
We just deployed a Rails 3.1 app using the new asset pipeline. In Development
I'm using rails 3.1 and the asset pipeline (ruby 1.9.2). I get the following
I am working on a rails application that uses big javascript libraries (e.g. jquery
I'm new to the Asset Pipeline, having just migrated over from Rails 3.0. I'm
I was reading this post about the Rails 3.1 asset pipeline and the author
I'd like to use Jade templates client-side. Preferably generated using the Rails 3.1 asset

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.