部署到heroku时预编译资产失败

时间:2020-12-29 22:14:05

标签: ruby-on-rails heroku rubygems environment-variables

我在尝试部署旧 Rails 应用程序时遇到问题。自从它老以来,我知道有很多事情可能会失败,从今天早上开始我一直在一个一个地修复,但现在我被其他人也发布的东西困住了,但到目前为止对我不起作用。 我试过Heroku Precompiling Assets Failed 并通过了 https://devcenter.heroku.com/articles/rails-4-asset-pipeline,但仍然失败。

我将在这里重现日志:

git push heroku master
Enumerating objects: 2150, done.
Counting objects: 100% (2150/2150), done.
Delta compression using up to 8 threads
Compressing objects: 100% (770/770), done.
Writing objects: 100% (2150/2150), 4.08 MiB | 134.00 KiB/s, done.
Total 2150 (delta 1315), reused 2125 (delta 1300), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: -----> Installing bundler 1.17.3
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.6
remote: -----> Installing dependencies using bundler 1.17.3
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE=1 bundle install -j4
remote:        Fetching gem metadata from https://rubygems.org/.............
remote:        Fetching rake 13.0.3
remote:        Installing rake 13.0.3
remote:        Fetching concurrent-ruby 1.1.7
remote:        Fetching multi_json 1.15.0
remote:        Fetching minitest 4.7.5
remote:        Installing multi_json 1.15.0
remote:        Installing concurrent-ruby 1.1.7
remote:        Installing minitest 4.7.5
remote:        Fetching thread_safe 0.3.6
remote:        Fetching tzinfo 0.3.59
remote:        Installing thread_safe 0.3.6
remote:        Installing tzinfo 0.3.59
remote:        Fetching builder 3.1.4
remote:        Installing builder 3.1.4
remote:        Fetching erubis 2.7.0
remote:        Fetching rack 1.5.5
remote:        Installing erubis 2.7.0
remote:        Installing rack 1.5.5
remote:        Fetching mime-types 1.25.1
remote:        Installing mime-types 1.25.1
remote:        Fetching polyglot 0.3.5
remote:        Fetching activerecord-deprecated_finders 1.0.4
remote:        Installing activerecord-deprecated_finders 1.0.4
remote:        Installing polyglot 0.3.5
remote:        Fetching arel 4.0.2
remote:        Fetching bcrypt 3.1.16
remote:        Installing arel 4.0.2
remote:        Installing bcrypt 3.1.16 with native extensions
remote:        Fetching sass 3.2.19
remote:        Installing sass 3.2.19
remote:        Using bundler 1.17.3
remote:        Fetching coffee-script-source 1.12.2
remote:        Installing coffee-script-source 1.12.2
remote:        Fetching execjs 2.7.0
remote:        Installing execjs 2.7.0
remote:        Fetching thor 1.0.1
remote:        Installing thor 1.0.1
remote:        Fetching orm_adapter 0.5.0
remote:        Installing orm_adapter 0.5.0
remote:        Fetching hike 1.2.3
remote:        Installing hike 1.2.3
remote:        Fetching nio4r 2.5.4
remote:        Installing nio4r 2.5.4 with native extensions
remote:        Fetching pg 1.2.3
remote:        Installing pg 1.2.3 with native extensions
remote:        Fetching tilt 1.4.1
remote:        Installing tilt 1.4.1
remote:        Fetching rdoc 6.3.0
remote:        Installing rdoc 6.3.0
remote:        Fetching temple 0.8.2
remote:        Installing temple 0.8.2
remote:        Fetching turbolinks-source 5.2.0
remote:        Installing turbolinks-source 5.2.0
remote:        Fetching i18n 0.9.5
remote:        Installing i18n 0.9.5
remote:        Fetching rack-test 0.6.3
remote:        Installing rack-test 0.6.3
remote:        Fetching warden 1.2.7
remote:        Installing warden 1.2.7
remote:        Fetching treetop 1.4.15
remote:        Installing treetop 1.4.15
remote:        Fetching coffee-script 2.4.1
remote:        Installing coffee-script 2.4.1
remote:        Fetching uglifier 4.2.0
remote:        Installing uglifier 4.2.0
remote:        Fetching bootstrap-sass 3.0.3.0
remote:        Installing bootstrap-sass 3.0.3.0
remote:        Fetching bcrypt-ruby 3.1.5
remote:        Installing bcrypt-ruby 3.1.5
remote:        Fetching sprockets 2.12.5
remote:        Installing sprockets 2.12.5
remote:        Fetching sdoc 2.0.3
remote:        Installing sdoc 2.0.3
remote:        Fetching slim 3.0.9
remote:        Installing slim 3.0.9
remote:        Fetching turbolinks 5.2.1
remote:        Installing turbolinks 5.2.1
remote:        Fetching activesupport 4.0.0
remote:        Installing activesupport 4.0.0
remote:        Fetching mail 2.5.5
remote:        Installing mail 2.5.5
remote:        Fetching actionpack 4.0.0
remote:        Installing actionpack 4.0.0
remote:        Fetching activemodel 4.0.0
remote:        Installing activemodel 4.0.0
remote:        Fetching jbuilder 1.5.3
remote:        Installing jbuilder 1.5.3
remote:        Fetching actionmailer 4.0.0
remote:        Installing actionmailer 4.0.0
remote:        Fetching railties 4.0.0
remote:        Installing railties 4.0.0
remote:        Fetching sprockets-rails 2.0.1
remote:        Installing sprockets-rails 2.0.1
remote:        Fetching activerecord 4.0.0
remote:        Installing activerecord 4.0.0
remote:        Fetching puma 5.1.1
remote:        Installing puma 5.1.1 with native extensions
remote:        Fetching coffee-rails 4.0.1
remote:        Installing coffee-rails 4.0.1
remote:        Fetching devise 3.0.4
remote:        Installing devise 3.0.4
remote:        Fetching font-awesome-rails 4.7.0.5
remote:        Installing font-awesome-rails 4.7.0.5
remote:        Fetching jquery-rails 3.1.5
remote:        Installing jquery-rails 3.1.5
remote:        Fetching sass-rails 4.0.5
remote:        Installing sass-rails 4.0.5
remote:        Fetching slim-rails 3.2.0
remote:        Installing slim-rails 3.2.0
remote:        Fetching rails 4.0.0
remote:        Installing rails 4.0.0
remote:        Fetching devise_security_extension 0.10.0
remote:        Installing devise_security_extension 0.10.0
remote:        Bundle complete! 17 Gemfile dependencies, 57 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into `./vendor/bundle`
remote:        Post-install message from bcrypt-ruby:
remote:        
remote:        #######################################################
remote:        
remote:        The bcrypt-ruby gem has changed its name to just bcrypt.  Instead of
remote:        installing `bcrypt-ruby`, you should install `bcrypt`.  Please update your
remote:        dependencies accordingly.
remote:        
remote:        #######################################################
remote:        
remote:        Bundle completed (24.02s)
remote:        Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Installing node-v12.16.2-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/object/duplicable.rb:82: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
remote:        rake aborted!
remote:        SystemStackError: stack level too deep
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:125:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:157:in `local_cache_key'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:94:in `middleware'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/application/bootstrap.rb:64:in `block in <module:Bootstrap>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
remote:        /tmp/build_62ef82ec/config/environment.rb:5:in `<top (required)>'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
remote:        /tmp/build_62ef82ec/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to myaccount.
remote: 
To https://git.heroku.com/myaccount.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myaccount.git'

宝石文件:

source "https://rubygems.org"

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem "rails", "4.0.0"

# Bundler version compatible with Ruby 2.0 and onwards

gem "bundler", "1.17.3"

# Use sqlite3 as the database for Active Record

group :development, :test do
  gem "sqlite3"    #gem to use in development-test environment
end

group :production do
  gem "pg"         #gem to use in production environment
  gem "rails_12factor"
end

# Use SCSS for stylesheets
gem "sass-rails", "~> 4.0.0"

#gem 'newrelic_rpm'
gem "bootstrap-sass", "~> 3.0.3.0"

gem "font-awesome-rails"

# gem 'zurb-foundation', '~> 4.3.1'

# Use Uglifier as compressor for JavaScript assets
gem "uglifier", ">= 1.3.0"

# Use CoffeeScript for .js.coffee assets and views
gem "coffee-rails", "~> 4.0.0"

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem "slim-rails"

# Use jquery as the JavaScript library
gem "jquery-rails"

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem "turbolinks"

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem "jbuilder", "~> 1.2"

gem "devise", "~> 3.0.0"

gem "devise_security_extension"

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem "sdoc", require: false
end

#gem 'airbrake'

gem "puma"

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

应用程序.rb

require File.expand_path("../boot", __FILE__)

require "rails/all"
require "slim"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)

module Snedda
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de
    config.i18n.default_locale = :is

    config.sass.load_paths << File.expand_path("../../lib/assets/stylesheets/")
    config.assets.initialize_on_precompile = false

    config.assets.precompile += [
      "home.css",
      "home.js",
    ]
  end
end

我知道有些人建议使用远程 sqlite3,因为 heroku 不支持它,但这就是我将其设置为开发组的原因。

希望你能看到我看不到的东西! 提前致谢

1 个答案:

答案 0 :(得分:0)

Heroku 尝试使用 ruby​​ 2.6.0 构建资产,但您的 Rails 4.0 不兼容。 要使一切正常,您必须:

  • 升级导轨 (4.0.13 -> 4.1.16 -> 4.2.11.3 -> 5.0.7.2 -> 5.1.7)
  • 您自己的代码与新的红宝石兼容(2.4 然后是 2.6)
  • 确保您的应用在本地使用 2.6

另一种方法是用传统的 vps 替换 heroku,您可以在其中安装旧的 ruby​​ 并使用已弃用的导轨。但是出于安全考虑,不建议这样做,因为 4.0 和旧 gem 存在漏洞。