Rails预编译资产失败,返回函数外部

时间:2012-10-26 12:31:16

标签: ruby-on-rails deployment asset-pipeline

    [176.71.146.44] executing command
 ** [out :: 176.71.146.44] ** Invoke assets:precompile (first_time)
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Execute assets:precompile
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Invoke assets:precompile:all (first_time)
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Execute assets:precompile:all
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Invoke assets:precompile:primary (first_time)
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Invoke assets:environment (first_time)
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Execute assets:environment
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Invoke environment (first_time)
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Execute environment
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Invoke tmp:cache:clear (first_time)
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Execute tmp:cache:clear
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] ** Execute assets:precompile:primary
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] rake aborted!
 ** [out :: 176.71.146.44] 
 ** [out :: 176.71.146.44] 'return' outside of function (line: 29773, col: 8, pos: 908864)

有人知道这个错误吗?

1 个答案:

答案 0 :(得分:0)

我没有看到这个错误,但我的大多数asset:precompile错误最终都是特定资产中的问题。

当我有一个无法解释的错误时,我会一次尝试一件事。如果您正在使用源代码管理,是否可以回滚到以前的更改?如果尚未签入,请使用Git stash,Perforce shelf或类似内容。

以下是来自CoffeeScript文件的类似编译错误的人:http://youtrack.jetbrains.com/issue/RUBY-12178

希望有所帮助。