0

我最近开始在我的资产管道中遇到奇怪的行为。我正在使用 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...]

在过去的几个小时里,我一直在研究这个问题,试图找到关于这个问题发生在哪里的线索。在这一点上,我的主要问题是我从 rails 得到的反馈/错误输出。通过跟踪,我仍在查看我的许多资产文件/目录之一中似乎存在的问题。编译期间的其他调试或文件跟踪方法(可能是更详细的编译模式?)在这一点上会很棒。

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

4

1 回答 1

1

这是 twitter bootstrap gem 中的错误。错误的 css 语法。尝试从清单文件 application.css 中删除它并重新启动资产预编译。如果它真的引导 gem 尝试使用最新版本

于 2013-04-16T20:26:41.530 回答