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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:36:02+00:00 2026-06-01T04:36:02+00:00

Every time I change a .coffee file in the development mode, Rails creates a

  • 0

Every time I change a .coffee file in the development mode, Rails creates a corresponding .js file in the same /javascripts directory. With the result that Rails ends up processing both the files and therefore instead of firing an event once, I end getting that event firing twice. I have to remember to manually delete the .js file so I get the correct and anticipated behavior.

My question is: how can I prevent Rails from generating the .js file in the first place? Is it not supposed to compile the .coffee file in memory in the development mode? when I delete the generated .js file, I get the correct and anticipated behavior?

Thanks.

Bharat

  • 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-01T04:36:03+00:00Added an answer on June 1, 2026 at 4:36 am

    Check the <head> section of your page. You check it by viewing the source of the page when running your app. If you do so I would bet that you will see one or more .js files that are included twice. Make sure you don’t have unnecessary javascript_include_tags somewhere in your views.

    Unless you changed the default require statements in app/assets/javascripts/application.js, any javascript files that are in there are being automatically included as long as your layout is set to include them (which it is by default).

    Specifically, if you have this line in your application.js:

    //= require_tree .
    

    or

    //= require_directory .
    

    That will cause all .js files in the app/assets/javascripts directory (and sub directories if you have require_tree) to be included where you have the following in your page:

    <%= javascript_include_tag 'application' %>
    

    Usually this will be the case as it will be in your default layout (in app/views/layouts/application.html.erb).

    So if they are already included in your layout you want to make sure you’re not including them again any other way.

    Another thing you could try is to remove the include from your layout and then just include javascript files manually per view using javascript_include_tag.

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

Sidebar

Related Questions

Every time that I change a value in the designer after saving it, the
Every time I change a file in a web project in Visual Studio (.js,
I am now to Django and i find that every time i change my
I'm using a web service and every time I change something on the dataset,
Publishing my entire application to a server in the U.S. every time I change
I think beestings change the html every time. this means html is not able
How can I change the title of the command prompt window every time I
As per the Emacs docs , every time you open a file, Emacs changes
It appears to me that a simple change to a .cshmtl file in my
I dont want to update the whole texture every time i change a small

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.