我正在尝试将Rails 4.2应用程序部署到Heroku,但是在资产预编译步骤中出现堆栈级别太深错误:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/rake-11.1.2/lib/rake/ext/fixnum.rb:4: warning: constant ::Fixnum is deprecated
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:110: warning: constant ::Fixnum is deprecated
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:111: warning: constant ::Bignum is deprecated
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/builder-3.2.2/lib/builder/xchar.rb:111: warning: constant ::Fixnum is deprecated
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.5/lib/thread_safe/cache.rb:155: warning: constant ::Fixnum is deprecated
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/thread_safe-0.3.5/lib/thread_safe/cache.rb:155: warning: constant ::Fixnum is deprecated
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
rake aborted!
SystemStackError: stack level too deep
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/tmp/build_8529c6825cc1904afdc5ae19b4aaee28/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.5.2/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
最后一行只是重复一遍又一遍。这些资产可以在我的开发机上干净地编译。
答案 0 :(得分:0)
我刚刚升级到了新版本的Rails(4.2.11),一切正常。