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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:11:46+00:00 2026-05-31T09:11:46+00:00

I am deploying to heroku yet I saw that the css files aren’t being

  • 0

I am deploying to heroku yet I saw that the css files aren’t being served (they also cannot be found on heroku).

I read that I need to do rake assets:precompile locally at first yet when I do it I get:

C:\project>bundle exec rake assets:precompile --trace

** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
undefined: Unexpected token: operator (<)
  (in C:/project/app/assets/javascripts/application.js)

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

I have nothing in application.js so I don’t understand where the error is..

application.js is

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .

Thank you

Update

If removing a .js.erb file I get the following error

C:\project>bundle exec rake assets:precompile RAILS_ENV=production --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
706: unexpected token at 'C:\Users\me\AppData\Local\Temp\execjs20111021-6448-ei2nm3.js(2, 3) Microsoft JScript runtime error: Out of memory

'
  (in C:/project/app/assets/javascripts/application.js)

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

Still have problems with erb css and js files not compiling…

This doesn’t seem to end..
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-31T09:11:47+00:00Added an answer on May 31, 2026 at 9:11 am

    I think it is caused by an external javascript file which is not well-code-formatted. e.g.

    function say_hi(){
      // NOTICE that there's no semi-colon there!
      name = "Jim"
      alert("hi" + name )
    }
    

    when under the precompile, your code would put in 1 line, and since there’s no necessary semicolon, your generated js file probably contains errors, like

    "undefined: Unexpected token: operator (<)" 
    

    or something.

    so, my suggestion is:

    1. don’t compress the js file if it’s not well code-formatted, by setting “config.assets.compress = false” in your config file, following @Mike’s answer.

    2. use coffeescript as possible, it will help you generate very well formatted code. ( I am not a coffeescript guru, so please correct me if I am wrong )

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

Sidebar

Related Questions

I have a Rails 3.2 app that I'm deploying on the Heroku Cedar stack.
I'm deploying a Rails app on Heroku (for now) via git, and would also
I've got a project that I'm deploying to Heroku . The source code tree
I've been working through Hartl's excellent RoR (3.2) tutorial (and deploying to Heroku throughout)
I'm running a MySQL database locally for development, but deploying to Heroku which uses
I started deploying my latest RoR app on Heroku , which required me to
I ran into a problem deploying on Heroku do to a failure in the
I'm deploying something that has been running on my local and realized when I
When deploying a clojure app to Heroku, I see it is using cached Leiningen
I'm deploying my Rails app on Heroku (Cedar), and there were 3 options about

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.