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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:58:46+00:00 2026-05-25T01:58:46+00:00

I’m fairly new to Ruby on Rails and I’m planing to use a fair

  • 0

I’m fairly new to Ruby on Rails and I’m planing to use a fair amount of javascript in my application. I have done some research but I couldn’t find an answer to this one question:

Since you’re able to put simple html in all of the views (for example index.html.erb) I was under the assumption that the views basically act as a normal html webpage and therefore you should be able to do everything you can do with a normal html webpage. For example put javascript in it from any library you like as long as you include the right doctypes and provide tags for the sources to the libraries as you would in any other html webpage.
Is this correct or is there a catch I’m overlooking?

Because I found a lot on the internet about how it’s not so simple to use RoR with any javascript library and that you have to take special steps and so forth…

I really would appreciate it if someone could shed some light on this for me.
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-05-25T01:58:47+00:00Added an answer on May 25, 2026 at 1:58 am

    Just point the source place of your javascript files at your layout/application.html.erb file.

    e.g: <%= javascript_include_tag :defaults %>.

    This will load all the javascript files that are present in your public/javascripts/ directory.

    If you need to be more specific you could also put each file separated by a simple comma, like this:

    <%= javascript_include_tag 'jquery.js', 'application.js', 'jquery_ujs.js','jquery-ui-1.8.15.custom.min.js' %>

    And it’s a better approach to put all your javascript code on a file inside that directory.

    If it’s for general usage you could put the code in the public/javascripts/application.jsfile.

    Hope it helps you!

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

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.