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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:13:17+00:00 2026-05-23T14:13:17+00:00

I have this stock rails 3.1 app, before even adding anything, I was testing

  • 0

I have this stock rails 3.1 app, before even adding anything, I was testing to see if the assets are working as advertised

so i created this app/assets/javascripts/test.coffee

where test.coffee is just a

alert “hi”

When I navigate to http://127.0.0.1:3000/assets/test.coffee, I do see

(function() {
  alert("hi");
}).call(this);

But if I do http://127.0.0.1:3000/assets/test.js, I get routing error; but I thought this is the correct behavior, not the above one. What have I done wrong?

  • 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-23T14:13:17+00:00Added an answer on May 23, 2026 at 2:13 pm

    Try renaming your your js file to test.js.coffee

    Coffee extension indicates that this file should be preprocessed with coffee processor, same as:

    • index.html.haml is just index.html with haml processor or
    • style.css.sass is just style.css with sass processor
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well this probably isn't specific to rails, but in my rails app, I have
I have a rails app that is working fine except for one thing. When
I have in my stock rails 3.1 app's projects#index.html.erb a javascript section to reads
A previously-working Rails 3.1 app is now failing to deploy. The Capistrano deploy:assets:precompile task
I have 2 tables like this: Stock Table product_id bigint(20) qty float Sales Table
Ok this is something weird. I got authlogic-oid installed in my rails app today.
Still can't get this working...Rails 3.1.3, Ruby 1.9.2 on Heroku's Cedar Stack. Trying to
I have troubles to push my rails app on heroku. In my local server,
I've been trying to build my first rails app and have gotten stuck on
I have generated some scaffolding for my rails app. I am running the generated

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.