Rails预编译资产不起作用

时间:2013-08-30 14:16:23

标签: ruby-on-rails production-environment

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

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文件正在执行该错误..它的 的资产/管理/ 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 .

什么都没发生,但如果我删除该文件的工作..(每次更改我都需要重新启动服务器并且我在运行中设置编译)

0 个答案:

没有答案