【发布时间】:2020-08-22 01:36:11
【问题描述】:
我遇到了这个问题,
到目前为止,我有 将 ruby、rvm、bootsnap 和 pry 升级到最新版本 当我尝试将我的应用程序推送到 Heroku 时,
$git push heroku master
最终失败,出现以下错误:
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: ! rake aborted!
remote: ! TypeError: no implicit conversion of String into Integer
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
remote: !
...
...
/tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `block in require'
remote: !
...
...
/tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require_relative'
remote: ! ....
.....
/tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/lib/rake/application.rb:703:in `raw_load_rakefile'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/lib/rake/application.rb:104:in `block in load_rakefile'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/lib/rake/application.rb:103:in `load_rakefile'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/lib/rake/application.rb:82:in `block in run'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
remote: ! /tmp/build_00cbfd62aabf08d9eeba7a2d621c4bd6/vendor/bundle/ruby/2.7.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
remote: ! ./vendor/bundle/bin/rake:29:in `load'
remote: ! ./vendor/bundle/bin/rake:29:in `<main>'
remote: !
remote: /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/helpers/rake_runner.rb:106:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError)
remote: ensure you can run `$ bundle exec rake -P` against your app
remote: and using the production group of your Gemfile.
remote: rake aborted!
remote: TypeError: no implicit conversion of String into Integer
【问题讨论】:
-
试图按照错误消息中的说明进行操作:$。捆绑执行 rake -P。我得到
rake aborted! TypeError: no implicit conversion of String into Integer -
做了以下修改:在 database.yml 适配器中:postgresql,并将 bootsnap 更新为 >= 1.3.2...
-
出现此错误:远程:任务:TOP => 资产:预编译远程:(通过使用--trace 运行任务查看完整跟踪)远程:远程:!偏僻的: !预编译资产失败。偏僻的: !偏僻的: !推送被拒绝,无法编译 Ruby 应用程序。
标签: ruby-on-rails ruby heroku rubygems