ruby-on-rails - 无法检测 rake 任务 - Errno::ENOENT: 没有这样的文件或目录 - R

标签 ruby-on-rails ruby heroku

我正在尝试将应用程序部署到heroku。当我在 gemfile 中有 gem 'rootapp-rinruby' 时,它部署得很好,但是当我使用 gem 'rinruby' 时,会出现以下输出。

我一直在尝试进行一些调试,包括:

  • 生产.rb中设置config.assets.compile = true,并通过建议的方法here进行设置
  • 正在运行bundle exec rake -P(请参阅下面第二个代码片段中的输出)
  • 更新 gem

我真的被困住了。

我确实注意到 ruby/2.5.0 频繁出现在下面的错误消息中,这让我很怀疑,因为 ruby -v 返回 ruby 2.5.1p57 (2018-03-29 修订版 63029)[x86_64-darwin17] 并且我在 gemfile 中有 ruby '2.5.1' 。但这可能与此无关

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:  !     Errno::ENOENT: No such file or directory - R
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:165:in `popen'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:165:in `initialize'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:843:in `new'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:843:in `<main>'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `each'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `block in require'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `each'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `require'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler.rb:114:in `require'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/config/application.rb:7:in `<top (required)>'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/Rakefile:4:in `require_relative'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/Rakefile:4:in `<top (required)>'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load_rakefile'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:703:in `raw_load_rakefile'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:104:in `block in load_rakefile'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:103:in `load_rakefile'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:82:in `block in run'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
remote:  !     /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.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/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/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: Errno::ENOENT: No such file or directory - R
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:165:in `popen'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:165:in `initialize'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:843:in `new'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rinruby-2.1.0/lib/rinruby.rb:843:in `<main>'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `each'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `block in require'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `each'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `require'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/bundler-2.0.1/lib/bundler.rb:114:in `require'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/config/application.rb:7:in `<top (required)>'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/Rakefile:4:in `require_relative'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/Rakefile:4:in `<top (required)>'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/rake_module.rb:29:in `load_rakefile'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:703:in `raw_load_rakefile'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:104:in `block in load_rakefile'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:103:in `load_rakefile'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:82:in `block in run'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
remote: /tmp/build_99640cf607032d1a25691490e41eab94/vendor/bundle/ruby/2.5.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:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/ruby.rb:860:in `rake'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails2.rb:79:in `has_jobs_work_task?'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails2.rb:53:in `block in default_process_types'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:48:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:44:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails2.rb:46:in `default_process_types'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails3.rb:29:in `block in default_process_types'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:48:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:44:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails3.rb:23:in `default_process_types'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails4.rb:26:in `block in default_process_types'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:48:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:44:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails4.rb:25:in `default_process_types'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:104:in `write_release_yaml'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:82:in `compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/ruby.rb:114:in `block in compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:48:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:44:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/ruby.rb:92:in `compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails2.rb:62:in `block in compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:48:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:44:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails2.rb:60:in `compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails3.rb:42:in `block in compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:48:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:44:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails3.rb:41:in `compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/rails4.rb:41:in `block in compile'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:48:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/base.rb:44:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:17:in `block in instrument'
remote:     from /tmp/tmp.q2p3L4pFHs/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:16:in `instrument'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/lib/language_pack/instrument.rb:35:in `trace'
remote:     from /app/tmp/buildpacks/19b20846a186a4065aa6710b809d0c465ff7a2235264402d06b5038f9562c56867a32c308dd2410d96108925a9f9fed74b5ef871dd6514a3a3a5485da3f442cf/bin/support/ruby_compile:15:in `<main>'
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected 

运行bundle exec rake -P 返回

rake about
    environment
rake active_storage:install
    environment
rake active_storage:install:migrations
rake app:template
    environment
rake app:templates:copy
rake app:update
    update:configs
    update:bin
    update:upgrade_guide_info
rake app:update:bin
rake app:update:configs
rake app:update:upgrade_guide_info
rake assets:clean
    environment
rake assets:clobber
    environment
rake assets:environment
rake assets:precompile
    environment
    yarn:install
rake cache_digests:dependencies
    environment
rake cache_digests:nested_dependencies
    environment
rake db:_dump
rake db:abort_if_pending_migrations
    load_config
rake db:charset
    load_config
rake db:check_protected_environments
    load_config
rake db:collation
    load_config
rake db:create
    load_config
rake db:create:all
    load_config
rake db:drop
    load_config
    check_protected_environments
rake db:drop:_unsafe
    load_config
rake db:drop:all
    load_config
    check_protected_environments
rake db:environment:set
    load_config
rake db:fixtures:identify
    load_config
rake db:fixtures:load
    load_config
rake db:forward
    load_config
rake db:load_config
    environment
rake db:migrate
    load_config
rake db:migrate:down
    load_config
rake db:migrate:redo
    load_config
rake db:migrate:reset
    db:drop
    db:create
    db:migrate
rake db:migrate:status
    load_config
rake db:migrate:up
    load_config
rake db:purge
    load_config
    check_protected_environments
rake db:purge:all
    load_config
    check_protected_environments
rake db:reset
    db:drop
    db:setup
rake db:rollback
    load_config
rake db:schema:cache:clear
    load_config
rake db:schema:cache:dump
    load_config
rake db:schema:dump
    load_config
rake db:schema:load
    load_config
    check_protected_environments
rake db:schema:load_if_ruby
    db:create
    environment
rake db:seed
rake db:setup
    db:schema:load_if_ruby
    db:structure:load_if_sql
    seed
rake db:structure:dump
    load_config
rake db:structure:load
    load_config
    check_protected_environments
rake db:structure:load_if_sql
    db:create
    environment
rake db:test:load
    db:test:purge
rake db:test:load_schema
    db:test:purge
rake db:test:load_structure
    db:test:purge
rake db:test:prepare
    load_config
rake db:test:purge
    load_config
    check_protected_environments
rake db:version
    load_config
rake default
    spec
rake dev:cache
rake environment
rake initializers
    environment
rake lambo
    environment
rake log:clear
rake middleware
    environment
rake notes
rake notes:custom
rake notes:fixme
rake notes:optimize
rake notes:todo
rake railties:install:migrations
    db:load_config
rake restart
rake routes
    environment
rake secret
rake spec
    spec:prepare
rake spec:helpers
    spec:prepare
rake spec:prepare
rake spec:statsetup
rake stats
    spec:statsetup
rake test
rake test:controllers
    test:prepare
rake test:db
    db:test:prepare
    test
rake test:functionals
    test:prepare
rake test:generators
    test:prepare
rake test:helpers
    test:prepare
rake test:integration
    test:prepare
rake test:jobs
    test:prepare
rake test:mailers
    test:prepare
rake test:models
    test:prepare
rake test:prepare
rake test:run
    test
rake test:system
    test:prepare
rake test:units
    test:prepare
rake time:zones
rake time:zones:all
rake time:zones:local
rake time:zones:us
rake tmp
rake tmp/cache
rake tmp/cache/assets
rake tmp/pids
rake tmp/sockets
rake tmp:cache:clear
rake tmp:clear
    tmp:cache:clear
    tmp:sockets:clear
    tmp:screenshots:clear
rake tmp:create
    tmp/cache
    tmp/sockets
    tmp/pids
    tmp/cache/assets
rake tmp:pids:clear
rake tmp:screenshots:clear
rake tmp:sockets:clear
rake yarn:install

最佳答案

当 Rails 需要 rinruby gem 时,它将调用 RinRuby.new (请参阅 here ),它最终会尝试运行 R 命令,请参阅 here 。使用 rootapp-rinruby gem 时不会引发错误,因为在需要 gem/文件时不会调用 RinRuby.new

但是,当使用 rootapp-rinruby gem 并调用 RinRuby.new 时,会出现类似的错误。

解决这个问题的方法是在 Heroku 上安装 R 库。我建议检查一下如何安装它。一些快速的 Google 结果:

对于 rinruby,您还必须确保 heroku R 构建包安装 Ruby/bundler 构建包

关于ruby-on-rails - 无法检测 rake 任务 - Errno::ENOENT: 没有这样的文件或目录 - R,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54721269/

相关文章:

ruby-on-rails - 名称错误 : uninitialized constant Carrierwave (Deploy to Heroku)

sql - Rails 应用程序外键错误 : Administrative user not allowed to delete other users in

在 js.erb Ruby on Rails 中呈现部分后, Assets 中的 Javascript 无法正常工作

ruby-on-rails - 为什么不推荐使用 Rails Inflector 模块?

ruby-on-rails - 目录 : Best way to build 'dashboard' type page?

Heroku Go 应用崩溃

ruby-on-rails - 来自 omniauth 的双重请求(设计、自定义策略、oauth2)

ruby-on-rails - 如何使用 ruby​​ on Rails 3.2 将 ajax 添加到 jquery-ui slider

ruby - 如何添加代码以将 header 设置到简单的 ruby​​ webrick 命令行?

heroku - 与Heroku分开的前端和后端