Не удалось обнаружить задачи rake, убедитесь, что вы можете запустить `$ bundle exec rake -P` для своего приложения - PullRequest
0 голосов
/ 01 декабря 2019

Я пытался запустить git push heroku master и продолжаю получать следующую ошибку:

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:  !     Activating bundler (2.0.1) failed:
remote:  !     Could not find 'bundler' (= 2.0.1) - did find: [bundler-2.0.2]
remote:  !     Checked in 'GEM_PATH=vendor/bundle/ruby/2.4.0', execute `gem env` for more information
remote:  !
remote:  !     To install the version of bundler this project requires, run `gem install bundler -v '2.0.1'`
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: Activating bundler (2.0.1) failed:
remote: Could not find 'bundler' (= 2.0.1) - did find: [bundler-2.0.2]
remote: Checked in 'GEM_PATH=vendor/bundle/ruby/2.4.0', execute `gem env` for more information
remote:
remote: To install the version of bundler this project requires, run `gem install bundler -v '2.0.1'`
remote:     from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/ruby.rb:961:in `rake'
remote:     from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/rails4.rb:84:in `block (2 levels) in run_assets_precompile_rake_task'
remote:     from /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/base.rb:135:in `log'

Я запустил все, что было предложено выше, и продолжил получать сообщение об ошибке. Затем я следовал этому руководству: Не удалось обнаружить задачи с граблями

Самая последняя версия, и я начал получать эту ошибку:

rvm install "ruby-2.6.3"
Warning, new version of rvm available '1.29.9-next', you are using older version '1.29.4'.
You can disable this warning with:    echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.13/x86_64/ruby-2.6.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Updating Homebrew...

Error: undefined method `any?' for nil:NilClass
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:216:in `depends_on'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:235:in `block in check_dependents'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:235:in `sort'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:235:in `check_dependents'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:114:in `upgrade'
/usr/local/Homebrew/Library/Homebrew/brew.rb:102:in `<main>'
Requirements installation failed with status: 1.
➜  dancortesPortfolio git:(master) ✗ gem install bundler '2.0.2'
Error loading RubyGems plugin "/Users/danale/.rvm/gems/ruby-2.4.0@global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": dlopen(/Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle
  Reason: image not found - /Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle (LoadError)
Error loading RubyGems plugin "/Users/danale/.rvm/gems/ruby-2.4.0@global/gems/gem-wrappers-1.2.7/lib/rubygems_plugin.rb": dlopen(/Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle
  Reason: image not found - /Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle (LoadError)
ERROR:  Loading command: install (LoadError)
    dlopen(/Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle
  Reason: image not found - /Users/danale/.rvm/gems/ruby-2.4.0@global/gems/openssl-2.0.3/lib/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

1 Ответ

0 голосов
/ 01 декабря 2019

Похоже, у вас есть версия 2.0.1, но heroku работает под управлением 2.0.2. Вы можете попробовать обновить пакет на вашем компьютере: gem install bundler, а затем повторно запустить bundle install в вашем проекте.

Возможно, вы также столкнулись с этой проблемой, если не можете обновить пакет: https://github.com/rvm/rvm/issues/3923. В частности:

...you are using rvm-1.29.1 or later it is likely caused by a pre-1.1 OpenSSL version that is installed or symlinked to /usr/local.

You can check which formula /usr/local/bin/openssl is symlinked to and to a brew unlink <fomula> and then do a rvm reinstall of the broken ruby version.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...