ruby - 需要帮助在 Mac 上安装 Ruby 2.7.2

标签 ruby homebrew rbenv

我正在尝试在我的 Mac(带有所有更新的最新操作系统)上安装 Ruby 版本 2.7.2 并执行以下操作

brew update
brew upgrade rbenv ruby-build
进而
rbenv install 2.7.2
ruby-build: definition not found: 2.7.2

See all available versions with `rbenv install --list'.

If the version you need is missing, try upgrading ruby-build:

  brew update && brew upgrade ruby-build
所以我尝试按照上面的说明进行操作并得到这个
brew update && brew upgrade ruby-build
Already up-to-date.
Warning: ruby-build 20200926 already installed

最佳答案

您需要安装最新的ruby-build

$ brew unlink ruby-build # remove STABLE version
$ brew install --HEAD ruby-build 
$ rbenv install -l | grep '2.7.2'
2.7.2


Only latest stable releases for each Ruby implementation are shown.
Use 'rbenv install --list-all' to show all local versions.

关于ruby - 需要帮助在 Mac 上安装 Ruby 2.7.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64185912/

相关文章:

mysql - 在时间戳内获取记录但不特定于日期

c++ - CMake 错误 : Imported targets not available for Boost version 106300

apache - Homebrew PHP 安装中断 Apache 2.4

RubyGems 忽略 `.gemrc` ?

c++ - 为什么 Crypto++ 和 Ruby 生成的 SHA-1 哈希略有不同?

python - python BeautifulSoup 库的 ruby​​ 等价物是什么?

ruby - 使用系统中的 rbenv 和 "shell"命令更改 Ruby 版本不起作用

ruby - 不小心删除了很多 "git clean -fd"的 stash 文件,现在我无法安装 Ruby

ruby-on-rails - 通过先写入 redis 来加速 web 服务,然后写入磁盘?

ruby-on-rails - 如何判断 Mac OS X 上是否安装了 Homebrew 软件