私はherokuにプッシュしようとしているレール3.1アプリを持っています。プッシュが機能している間、エラーは資産を掘り起こそうとするときに発生します。エラーが発生する`rake assets:precompile`を実行したときのエラー
Unexpected token punc, expected punc (line: 11225, col: 7, pos: 321149)
undefined
(in /Users/Matt/Orchive/Orchive/app/assets/javascripts/application.js)
ただし、このapplication.jsファイルにはいくつかのコメントしかありません。ここでは、次のとおりです。
// 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
私は本当に資産を理解していないが、私は
/Users/Matt/.rvm/rubies/ruby-1.9.2-p180/bin/ruby /Users/Matt/.rvm/gems/ruby-1.9.2-p180/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Unexpected token punc, expected punc (line: 11225, col: 7, pos: 321149)
undefined
(in /Users/Matt/Orchive/Orchive/app/assets/javascripts/application.js)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/Users/Matt/.rvm/rubies/ruby-1.9.2-p180/bi...]
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
をプッシュする前に、端末でrake assets:precompile
を実行しようとしたこの大規模なエラーを得た私はこれを編集して、どのようなことにそれを変更することができますそれがより役に立ちそうなら、--trace
と表示されます。 これは一般的な、簡単な修正エラーで、私はちょうどやり方がわからないと思います。
エラーの原因となるapplication.jsの行が表示される場合があります。 – sosborn
は奇妙な部分ですが、app/assets/javascript/application.jsにはコメントのみが含まれています。 – Vasseurth
他のjavascriptファイルはそのディレクトリにありますか? – sosborn