如何解决Heroku:rake 预编译的参数数量错误
背景:我正在尝试将 Heroku 应用程序从 14 更新到 20。我相信我已经正确捆绑了所有 gem,现在希望推送该应用程序。
鉴于我在网上遇到的类似情况,我的猜测是我必须更新一些 gem。但是,当我运行更新时,似乎所有 gem 都是最新的。
~/Doc/gentle-island-2510 | master >8 git push heroku master
Enumerating objects: 41,done.
Counting objects: 100% (41/41),done.
Delta compression using up to 4 threads
Compressing objects: 100% (29/29),done.
Writing objects: 100% (33/33),4.45 KiB | 2.23 MiB/s,done.
Total 33 (delta 21),reused 6 (delta 2)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/ruby
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-3.0.0
remote: Purging Cache. Changing stack from cedar-14 to heroku-20
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: Bundle complete! 14 Gemfile dependencies,59 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into `./vendor/bundle`
remote: Removing bundler (1.17.3)
remote: Bundle completed (134.54s)
remote: Cleaning up the bundler cache.
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: rake aborted!
remote: ArgumentError: wrong number of arguments (given 3,expected 2)
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/actionpack-5.2.6/lib/action_dispatch/middleware/static.rb:111:in `initialize'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:37:in `new'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:37:in `build'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `block in build'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `each'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `inject'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `build'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/engine.rb:510:in `block in app'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/engine.rb:506:in `synchronize'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/engine.rb:506:in `app'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `instance_exec'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `run'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/initializable.rb:61:in `block in run_initializers'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/initializable.rb:60:in `run_initializers'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/application.rb:361:in `initialize!'
remote: /tmp/build_f44696fb/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/application.rb:337:in `require'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/application.rb:337:in `require_environment!'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/railties-5.2.6/lib/rails/application.rb:520:in `block in run_tasks_blocks'
remote: /tmp/build_f44696fb/vendor/bundle/ruby/3.0.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/task.rb:61: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 gentle-island-2510.
remote:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。