【问题标题】:Updating RVM, Ruby, and Rails on macOS在 macOS 上更新 RVM、Ruby 和 Rails
【发布时间】:2020-08-08 13:40:22
【问题描述】:

我正在开发中使用 macOS(产品中的 Ubuntu),并希望为我的下一个项目更新内容。但我一直遇到问题:


$ rvm -v
rvm 1.28.0 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]

$ brew -v
Homebrew 2.4.9
Homebrew/homebrew-core (git revision 50be1b; last commit 2020-08-08)
Homebrew/homebrew-cask (git revision ccae745; last commit 2020-08-08)

$ rails -v
Rails 5.1.6.1

如果我打开自动更新 rvm

我无法通过更新 rvm 的第一步

$ rvm install 2.6.1
Found old RVM 1.28.0 - updating.
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /Users/edmund/.rvm/archives/rvm-installer.asc
gpg: Signature made Wed Jul 24 05:59:45 2019 HKT using RSA key ID 39499BDB
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found.
Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/Users/edmund/.rvm/archives/rvm-installer' - 'https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc'!
try downloading the signatures:

    gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

the key can be compared with:

    https://rvm.io/mpapis.asc
    https://keybase.io/mpapis

当我按照说明进行操作时:

$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: unable to execute program `/usr/local/Cellar/gnupg2/2.0.30_3/libexec/gpg2keys_curl': No such file or directory
gpg: no handler for keyserver scheme `hkp'
gpg: keyserver receive failed: Keyserver error

遵循“如果失败”指令似乎不会引发错误,但无助于解决问题

command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
gpg: key D39DC0E3: "Michal Papis (RVM signing) <mpapis@gmail.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

我是否遗漏了一些明显的东西?

如果我关闭自动更新 rvm

$ rvm install 2.6.1
Warning, new version of rvm available '1.29.10-next', you are using older version '1.28.0'.
You can disable this warning with:    echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/osx/10.15/x86_64/ruby-2.6.1.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system....
Installing required custom packages: homebrew/dupes homebrew/dupes.
Error running 'requirements_osx_brew_install_custom homebrew/dupes homebrew/dupes',
showing last 15 lines of /Users/edmund/.rvm/log/1596893890_ruby-2.6.1/install_custom.log
    do
        brew tap "${__tap}" || return $?;
    done
}
current path: /Users/edmund/Documents/playground/ugdev
GEM_HOME=/Users/edmund/.rvm/gems/ruby-2.4.0
PATH=/Users/edmund/.rvm/gems/ruby-2.4.0/bin:/Users/edmund/.rvm/gems/ruby-2.4.0@global/bin:/Users/edmund/.rvm/rubies/ruby-2.4.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/edmund/.rvm/bin
GEM_PATH=/Users/edmund/.rvm/gems/ruby-2.4.0:/Users/edmund/.rvm/gems/ruby-2.4.0@global
command(3): requirements_osx_brew_install_custom homebrew/dupes homebrew/dupes
++ typeset __tap
++ for __tap in '"$@"'
++ brew tap homebrew/dupes
Updating Homebrew...
Error: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
++ return 1
Requirements installation failed with status: 1.

顺便说一下已经更新了brew...

有什么线索吗?

【问题讨论】:

    标签: ruby ruby-on-rails-3 rvm


    【解决方案1】:

    我知道我没有直接回答你的问题,但我已经离开使用 rvm 来解决这个问题(几年前),并转向 asdf

    【讨论】:

    • asdf 在 Ubuntu 上稳定吗?它的发展如何?我还没有听说过,所以我只是担心它会在一段时间内失去支持,我必须切换回 rvm...
    • @EdmundTo - 在过去的 3-4 年里我一直在使用它 - 但是,在 Mac 上。不幸的是,我还没有在任何其他操作系统上尝试过它——但是,看看 GH repos 上的活动,我认为它很好用。
    • 非常感谢,我会开始尝试的,RVM真让人头疼……
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-17
    • 1970-01-01
    • 2013-07-01
    • 2018-05-23
    相关资源
    最近更新 更多