【问题标题】:Install ruby with asdf on MacOS via Homebrew通过 Homebrew 在 MacOS 上使用 asdf 安装 ruby
【发布时间】:2022-01-04 14:13:05
【问题描述】:

我最近想在 MacOS Big Sur 11.5 Beta 上安装不同版本的 ruby​​ 和 Rails。我通过 Homebrew 安装了 asdf。我想运行 rails server 但收到消息:

No preset version installed for command ruby
Please install a version by running one of the following:

asdf install ruby 3.0.2

or add one of the following versions in your config file at /Users/philippkorn/.tool-versions
ruby 3.0.1

当我尝试运行任何 asdf install ruby​​ 命令(即asdf install ruby latest)时,我收到以下错误消息:

~ $ asdf install ruby latest                                                                                                                                                            (base)
Version not found

我尝试使用自制软件重新安装 asdf,但错误仍然存​​在...

【问题讨论】:

  • edit 我用的是鱼壳。

标签: ruby macos homebrew asdf


【解决方案1】:

我也面临同样的情况。好像很快就修好了。

https://github.com/asdf-vm/asdf-ruby/issues/239

编辑~/.asdf/plugins/ruby/bin/install 并应用this patch 然后问题就解决了。

-  if [[ -n "$matching_version" ]]; then
+  if [[ -z "$matching_version" ]]; then

【讨论】:

  • 也为我工作,谢谢!
  • 很高兴我找到了这个。非常感谢!
  • 你救了我!谢谢!
猜你喜欢
  • 1970-01-01
  • 2018-12-07
  • 1970-01-01
  • 2021-11-20
  • 2019-03-01
  • 2022-09-23
  • 2012-08-30
  • 2022-12-04
  • 2018-04-02
相关资源
最近更新 更多