Đang cố gắng để chạyLàm thế nào để thay đổi phiên bản Ruby cho Homebrew trong macOS trong Travis CI?
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi
trong before_install
, tôi kết thúc với
/usr/local/Homebrew/Library/Homebrew/brew.rb:12:in \`<main>': Homebrew must be run under Ruby 2.3! (RuntimeError)
The command "if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi" failed and exited with 1 during .
Your build has been stopped.
/Users/travis/.travis/job_stages: line 166: shell_session_update: command not found
Vì vậy, tôi cho rằng vấn đề ở đây là ruby
đang dùng phiên bản 2.0, mà tôi khẳng định với ruby --version
. Điều thú vị là, các bản dựng của tôi chỉ ngừng hoạt động đột ngột, không thay đổi .travis.yml.
Vậy làm cách nào để thực sự thay đổi các phiên bản Ruby?
Có thể là quan trọng đối với không, rằng trước khi git clone
đang chạy tôi có được điều này:
$ rvm use
Warning! PATH is not properly set up, '/Users/travis/.rvm/gems/ruby-2.0.0-p648/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p648'.
Tôi đang gặp sự cố tương tự khi cài đặt mutt. Tôi đang đọc thông tin sau đây, không biết liệu https://discuss.circleci.com/t/homebrew-must-be-run-under-ruby-2-3-runtimeerror/17232/6 –
có liên quan không bạn đang sử dụng rvm để quản lý các phiên bản của Ruby. Có đúng không? – zee