繁体   English   中英

Rails资产:预期的')'得到了'}'-命令失败,状态为(1)

[英]Rails Assets: expected ')' got '}' - Command failed with status (1)

我最近开始在资产管道中遇到奇怪的行为。 我正在使用Ruby on Rails(3.2.3)。 我正在使用的著名库:

# From Gemfile
gem 'jquery-rails'
gem 'therubyracer', :require => 'v8'
gem "less-rails"
gem 'twitter-bootstrap-rails', '>= 2.1.6'
gem 'sass-rails', '~> 3.2.3'
gem 'devise', '~> 2.2.3'        #   Note: Recently upgraded

我最近去编译我的资产,并且碰壁了:

$ bundle exec rake assets:precompile RAILS_ENV=development --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/tim/.rvm/rubies/ruby-1.9.3-p374/bin/ruby /Users/tim/.rvm/gems/ruby-1.9.3-p374/bin/rake assets:precompile:all RAILS_ENV=development RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
expected ')' got '}'
Command failed with status (1): [/Users/tim/.rvm/rubies/ruby-1.9.3-p374/bin...]

在过去的几个小时中,我一直在寻找有关此问题的任何信息,以寻找有关此问题发生在哪里的线索。 在这一点上,我的主要问题是我从轨道获得的反馈/错误输出。 通过跟踪,我仍在查看似乎在我的许多资产文件/目录之一中存在的问题。 此时,其他调试或文件跟踪的方法(也许是更详细的编译模式?)会很好。

下一步是检查Git提交日志,查看对资产管道的哪些更改可能导致了此问题。

这是twitter bootstrap gem中的错误。 错误的CSS语法。 尝试从清单文件application.css中将其删除,然后重新启动资产预编译。 如果它真的是自举宝石,请尝试使用最新版本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM