【发布时间】:2019-07-28 02:55:03
【问题描述】:
执行“git push heroku master”时出现错误。
我使用以下方法在本地编译资产:
rake assets:precompile RAILS_ENV=production --trace
问题是,这在过去几个月里一直在正常工作,直到昨天才决定失败。
我还尝试了以下方法从头开始重新编译,结果相同:
rake assets:clobber --trace
rake assets:precompile RAILS_ENV=production --trace
不确定如何调试。我最近的签入看起来很合理(即我没有编辑配置文件或 rakefile 等)。我正在更改一些 png 图像(新图像,调整图像大小),但在本地预编译似乎没有显示任何错误。
这是错误消息的开始。
remote: -----> Detecting rails configuration
remote: -----> Detecting rake tasks
remote:
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run `$ bundle exec rake -P` against your app
remote: ! and using the production group of your Gemfile.
remote: ! /tmp/build_a612be38eac01922e9ad7a0a8c37a351/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-9.4.10/lib/autoprefixer-rails/processor.rb:83: warning: else without rescue is useless
remote: ! rake aborted!
remote: ! SyntaxError: /tmp/build_a612be38eac01922e9ad7a0a8c37a351/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-9.4.10/lib/autoprefixer-rails/processor.rb:79: syntax error, unexpected '.'
remote: ! from ||= if defined? Rails&.respond_to?(:root) && Rails&.root
remote: ! ^
remote: ! /tmp/build_a612be38eac01922e9ad7a0a8c37a351/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-9.4.10/lib/autoprefixer-rails/processor.rb:79: syntax error, unexpected '.'
remote: ! from ||= if defined? Rails&.respond_to?(:root) && Rails&.root
remote: ! ^
【问题讨论】:
标签: ruby-on-rails heroku asset-pipeline