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 7709475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:52:19+00:00 2026-06-01T00:52:19+00:00

In mulitple views I am including an external javascript library with this HTML: <script

  • 0

In mulitple views I am including an external javascript library with this HTML:

<script type="text/javascript" 
        src="http://static.jstree.com/v.1.0pre/jquery.jstree.js">
</script>

In reading through the Rails 3.1 Asset Pipeline documentation and discussions I get the impression that vendor/assets/javascripts is a place were that file should be referenced. I’m guessing that I could download a copy of the file (jstree.js) and place it in that directory. However I’d like to have it loaded off the project site instead of making a local copy of it.

What do I put in vendor/assets/javascripts to pull a copy of jstree.js off the remote server? Do I create a .js file with some sort of remote load code? There seems to be all sorts of approaches and/or confusion on how to best do this ( see the long list of answers to this question: How do I include a JavaScript file in another JavaScript file? .)

Is there a “Rails Standard” convention/library/process for doing this? I’m a javascript neophyte, so please be explicit, thanks.

  • 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-06-01T00:52:20+00:00Added an answer on June 1, 2026 at 12:52 am

    No, there’s no way you can put a “reference” to a remote file in the assets folder. You either download a copy and put into assets, or reference remote file with <script> tag.

    Having a copy is not a bad idea, really. At least, you know that it works and the file hasn’t changed (unless you changed it yourself). When you load a remote file, all sorts of surprises can happen 🙂

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

Sidebar

Related Questions

I have a very large script which is creating multiple views. In a number
I've read every answer available for this question that I could find, including this
I've a custom webserver which parses HTTP requests including multipart-form data. In case of
I need to display some text on multiple views loaded on a UIScrollView .
I have an app with mulitple views. On view one I create and NSDate
Is it considered bad practice to have multiple views for same URL in MVC,
I've an android app that has multiple views. I've disabled the automatic orientation switching
I have a view that has multiple views inside it, and an image presentation
I have a MVVM application that contains multiple views with some complex IsReadOnly rules
What is the best way to share common objects between multiple views in an

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.