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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:14:41+00:00 2026-06-15T01:14:41+00:00

I am trying to deploy my app for the first time and running into

  • 0

I am trying to deploy my app for the first time and running into problems with the asset pipeline. When I run bundle exec rake assets:precompile I get the following error;

cool_app@ip-10-248-17-168:/rails_apps/cool_app/current$ bundle exec rake assets:precompile
/home/cool_app/.rvm/rubies/ruby-1.9.3-p327/bin/ruby /rails_apps/cool_app/shared/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Unexpected character '' (line: 13934, col: 1, pos: 403510)

Error
    at new JS_Parse_Error (<eval>:1720:22)
    at js_error (<eval>:1728:15)
    at parse_error (<eval>:1824:17)
    at next_token (<eval>:2070:17)
    at handle_slash (<eval>:2024:32)
    at Object.next_token [as input] (<eval>:2067:39)
    at next (<eval>:2175:37)
    at Object.semicolon [as 1] (<eval>:2221:38)
    at prog1 (<eval>:2770:28)
    at simple_statement (<eval>:2362:35)
  (in /rails_apps/cool_app/releases/20121128034720/app/assets/javascripts/application.js)

I presume that this means I have an illegal character (that’s not rendering) somewhere in my maze of javascript (should have deployed earlier!) but telling me it’s at column 1 on line 13934 doesn’t seem to be particularly useful. How do I go about hunting this down? The error message is spectacularly unhelpful (and I notice a lot of other questions on this theme here too).

  • Edit –

I’m not sure of the significance, but if I run RAILS_ENV=development rake assets:precompile on my development machine, the task seems to execute without complaint. My Server is Ubuntu 12.04 and my dev machine in OSX 10.8. I don’t know enough about Javascript runtimes to solve this myself right now (but I’m hunting).

  • 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-15T01:14:42+00:00Added an answer on June 15, 2026 at 1:14 am

    Hokay,

    My head hurts from the hours of bashing it against my keyboard but I solved my problem.

    First, some reading around suggested that uglifier was the cause of my error. I set config.assets.compress = false in config/production.rb and sure enough I was able to precompile my assets.

    I wasn’t happy with this though as my Javascript file was 625kB and I really wanted it compressed, so I looked in the generated application.js file and found what line 13934, column 1 referred to. Turns out it was line 8, column 1 of the file jquery.caret.1.02.js, a small jQuery plugin I am using. This first line looks like so;

     (function($,len,createRange,duplicate){
    

    with a space in front of the line. I deleted that space (I suspect it is some incorrect non-printing unicode character but haven’t bothered looking into it), set config.assets.compress = true, and tried again and no more error message! (and my Javascript is down to 159kB)

    I hope that this helps someone one day.

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

Sidebar

Related Questions

I'm trying to deploy my first AppHarbor-hosted app and have run into a problem
I'm trying for the first time to deploy an app to heroku and I'm
I'm trying to deploy a rails 3 app to heroku for the first time.
I'm trying to deploy an App for the first time on the App Engine
Trying to deploy an app to Heroku -- first time app and deployment --
I am trying to deploy an app to Heroku for the first time. The
I am trying to deploy my app on Rails for the first time using
I'm trying to deploy a rails app to Heroku and I'm running into some
Google App Engine says Must authenticate first. while trying to deploy any app: me@myhost
I'm trying to deploy my first rails app on a mediatemple (dv) and i'm

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.