Azure Развертывание службы приложений [ошибка] «find_spec_for_exe»: не удалось найти «сборщик» (2.1.4) - PullRequest
0 голосов
/ 08 мая 2020

Это результат выполнения сценария ниже:

/usr/local/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /home/site/wwwroot/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
from /usr/local/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/local/.rbenv/versions/2.6.2/bin/bundler:23:in `<main>' /usr/local/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /home/site/wwwroot/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
from /usr/local/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/local/.rbenv/versions/2.6.2/bin/bundle:23:in `<main>'
1 more errors. Click on expand view in the context menu to view complete logs.

изображение ошибки

Встроенный сценарий:

RBENV_VERSION=$(ls /usr/local/.rbenv/versions | grep 2.3 | tail -n 1)
eval "$(rbenv init -)"
rbenv global $RBENV_VERSION
bundle update
bundler --version
bundle exec rake

Как мне избавиться от ошибки?

1 Ответ

0 голосов
/ 11 мая 2020

Пожалуйста, попробуйте принудительно обновить систему ruby драгоценных камней, добавив sudo gem update --system:

- task: CmdLine@2
  inputs:
    script: |
      sudo gem update --system
      echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
      source $BASH_ENV
      gem install bundler
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...