在 macOS 上修復“Rails is not currently installed on this system”錯誤

我試圖安裝Rails,但一直遇到錯誤:“Rails is not currently installed on this system”。 直到我執行了以下步驟後,我才弄明白: 安裝 rvm brew install gpg2 gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB 然後運行 curl -sSL https://get.rvm.io | bash -s stable --rails 這將安裝最新穩定版本的Ruby和Rails 然後運行(Bash / Zsh) source /Users/flavio/.rvm/scripts/rvm 這樣,rails 命令就可以正常運行。 對於 Fish,我需要執行以下命令,而不是上面的命令: curl -L --create-dirs -o ~/.config/fish/functions/rvm.fish https://raw.github.com/lunks/fish-nuggets/master/functions/rvm.fish 然後運行 echo "rvm default" >> ~/.config/fish/config.fish