0

您好,我正在迁移到生产服务器并收到此错误(我启用了错误报告)

bootstrap.css isn't precompiled

所以我跑

rvmsudo rake assets:precompile:all RAILS_ENV=production

错误输出是

rake aborted!
Unexpected character '#' (line: 12521, col: 0, pos: 350962)

Error
    at new JS_Parse_Error (<eval>:2357:10736)
    at js_error (<eval>:2357:10955)
    at parse_error (<eval>:2357:12489)
    at Object.next_token [as input] (<eval>:2357:17217)
    at next (<eval>:2357:18479)
    at semicolon (<eval>:2357:19324)
    at simple_statement (<eval>:2357:21849)
    at <eval>:2357:20245
    at <eval>:2357:19536
    at <eval>:2357:31209
    at Object.parse (<eval>:2357:31418)
  (in /var/www/default/app/assets/javascripts/application.js)

application.js 包含

//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .

现在怎么办 ?

我可以把它关掉吗?我真的需要运行那个应用程序:p

编辑:我发现什么 .js 文件在做那个错误.. 它的 assets/admin/admin.js

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .

如果我删除

//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .

什么都没有发生,但是如果我删除该文件,它的工作..(每一次更改我都需要重新启动服务器,并且我设置了即时编译)

4

0 回答 0