試圖在before_install
運行如何在Travis CI中的MacOS中更改Homebrew的Ruby版本?
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3; fi
,我結束了
/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
所以我認爲這裏的問題是,ruby
是2.0版本,這是我與ruby --version
證實。有趣的是,我的構建突然停止工作,沒有任何改變.travis.yml。
那麼我該如何改變Ruby版本?
可能是不重要的,就是運行git clone
之前,我得到這個:
$ 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'.
我有一個類似的問題安裝mutt。我正在閱讀以下內容,不知道是否相關https://discuss.circleci.com/t/homebrew-must-be-run-under-ruby-2-3-runtimeerror/17232/6 –
看起來像你正在使用rvm來管理Ruby的版本。是對的嗎? – zee